From 4a336a5b117419c33c29eadd6409c69df78cd586 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sat, 20 Jul 2013 22:21:25 +0200 Subject: Imported Upstream version 2.4.6 --- Apache-apr2.dsw | 69 + Apache.dsw | 78 ++ CHANGES | 280 +++- Makefile.win | 8 +- build/NWGNUhead.inc | 2 + build/NWGNUtail.inc | 18 +- build/config.guess | 99 +- build/config.sub | 150 +- build/installwinconf.awk | 14 +- build/mkconfNW.awk | 9 +- build/nw_ver.awk | 16 +- build/rpm/httpd.spec.in | 4 +- configure | 447 +++++- configure.in | 5 +- docs/icons/apache_pb.gif | Bin 3315 -> 4463 bytes docs/icons/apache_pb2.gif | Bin 3361 -> 4234 bytes docs/man/apxs.1 | 5 +- docs/man/fcgistarter.8 | 6 +- docs/man/htpasswd.1 | 13 +- docs/man/httxt2dbm.1 | 5 +- docs/man/rotatelogs.8 | 7 +- docs/man/suexec.8 | 4 +- docs/man/tr/ab.1 | 8 +- docs/man/tr/apachectl.8 | 2 +- docs/man/tr/apxs.1 | 2 +- docs/man/tr/dbmmanage.1 | 5 +- docs/man/tr/fcgistarter.8 | 2 +- docs/man/tr/htcacheclean.8 | 2 +- docs/man/tr/htdbm.1 | 46 +- docs/man/tr/htdigest.1 | 4 +- docs/man/tr/htpasswd.1 | 32 +- docs/man/tr/httpd.8 | 2 +- docs/man/tr/httxt2dbm.1 | 5 +- docs/man/tr/logresolve.1 | 2 +- docs/man/tr/rotatelogs.8 | 2 +- docs/man/tr/suexec.8 | 4 +- docs/manual/configuring.html.en | 3 + docs/manual/configuring.html.fr | 4 + docs/manual/configuring.html.tr.utf8 | 1 + docs/manual/content-negotiation.html.en | 2 +- docs/manual/convenience.map | 17 + docs/manual/developer/modguide.html.en | 55 +- docs/manual/developer/modules.html.en | 2 +- docs/manual/developer/new_api_2_4.html.en | 4 + docs/manual/expr.html.en | 17 +- docs/manual/expr.html.fr | 15 +- docs/manual/howto/auth.html.tr.utf8 | 213 ++- docs/manual/howto/htaccess.html.en | 2 +- docs/manual/howto/public_html.html.tr.utf8 | 51 +- docs/manual/install.html.en | 5 +- docs/manual/install.html.fr | 4 +- docs/manual/install.html.tr.utf8 | 1 + docs/manual/logs.html.en | 2 +- docs/manual/logs.html.tr.utf8 | 1 + docs/manual/misc/perf-tuning.html.tr.utf8 | 263 ++-- docs/manual/misc/security_tips.html.en | 12 +- docs/manual/misc/security_tips.html.fr | 12 +- docs/manual/misc/security_tips.html.tr.utf8 | 74 +- docs/manual/mod/core.html.en | 2 +- docs/manual/mod/core.html.tr.utf8 | 998 +++++++------- docs/manual/mod/directives.html.de | 19 +- docs/manual/mod/directives.html.en | 19 +- docs/manual/mod/directives.html.es | 19 +- docs/manual/mod/directives.html.fr | 19 +- docs/manual/mod/directives.html.ja.utf8 | 19 +- docs/manual/mod/directives.html.ko.euc-kr | 19 +- docs/manual/mod/directives.html.tr.utf8 | 19 +- docs/manual/mod/directives.html.zh-cn | 19 +- docs/manual/mod/index.html.de | 7 +- docs/manual/mod/index.html.en | 7 +- docs/manual/mod/index.html.es | 7 +- docs/manual/mod/index.html.fr | 79 +- docs/manual/mod/index.html.ja.utf8 | 7 +- docs/manual/mod/index.html.ko.euc-kr | 7 +- docs/manual/mod/index.html.tr.utf8 | 7 +- docs/manual/mod/index.html.zh-cn | 7 +- docs/manual/mod/mod_alias.html.tr.utf8 | 175 +-- docs/manual/mod/mod_auth_basic.html.en | 68 + docs/manual/mod/mod_auth_basic.html.fr | 74 + docs/manual/mod/mod_auth_basic.html.ja.utf8 | 15 + docs/manual/mod/mod_auth_basic.html.ko.euc-kr | 15 + docs/manual/mod/mod_auth_digest.html.fr | 2 +- docs/manual/mod/mod_authnz_ldap.html.en | 15 + docs/manual/mod/mod_authnz_ldap.html.fr | 17 +- docs/manual/mod/mod_authz_core.html.en | 5 +- docs/manual/mod/mod_authz_core.html.fr | 47 +- docs/manual/mod/mod_authz_dbm.html.en | 23 +- docs/manual/mod/mod_authz_dbm.html.fr | 24 +- docs/manual/mod/mod_autoindex.html.tr.utf8 | 189 +-- docs/manual/mod/mod_cache.html.fr | 6 +- docs/manual/mod/mod_cache_socache.html | 5 + docs/manual/mod/mod_cache_socache.html.en | 277 ++++ docs/manual/mod/mod_dav_fs.html.fr | 2 - docs/manual/mod/mod_dir.html.tr.utf8 | 109 +- docs/manual/mod/mod_env.html.en | 2 +- docs/manual/mod/mod_env.html.tr.utf8 | 14 +- docs/manual/mod/mod_heartbeat.html | 4 + docs/manual/mod/mod_heartbeat.html.en | 6 +- docs/manual/mod/mod_heartbeat.html.fr | 140 ++ docs/manual/mod/mod_heartmonitor.html | 4 + docs/manual/mod/mod_heartmonitor.html.en | 6 +- docs/manual/mod/mod_heartmonitor.html.fr | 156 +++ docs/manual/mod/mod_imagemap.html | 4 + docs/manual/mod/mod_imagemap.html.en | 2 + docs/manual/mod/mod_imagemap.html.fr | 436 ++++++ docs/manual/mod/mod_imagemap.html.ko.euc-kr | 2 + docs/manual/mod/mod_include.html | 4 + docs/manual/mod/mod_include.html.en | 2 + docs/manual/mod/mod_include.html.fr | 1207 ++++++++++++++++ docs/manual/mod/mod_include.html.ja.utf8 | 2 + docs/manual/mod/mod_ldap.html.en | 5 + docs/manual/mod/mod_ldap.html.fr | 7 + docs/manual/mod/mod_log_config.html | 4 + docs/manual/mod/mod_log_config.html.en | 2 + docs/manual/mod/mod_log_config.html.fr | 609 ++++++++ docs/manual/mod/mod_log_config.html.ja.utf8 | 2 + docs/manual/mod/mod_log_config.html.ko.euc-kr | 2 + docs/manual/mod/mod_log_config.html.tr.utf8 | 58 +- docs/manual/mod/mod_log_debug.html | 4 + docs/manual/mod/mod_log_debug.html.en | 8 +- docs/manual/mod/mod_log_debug.html.fr | 186 +++ docs/manual/mod/mod_log_forensic.html.tr.utf8 | 5 +- docs/manual/mod/mod_lua.html.en | 1082 +++++++++++++-- docs/manual/mod/mod_lua.html.fr | 1049 ++++++++++++-- docs/manual/mod/mod_macro.html | 9 + docs/manual/mod/mod_macro.html.en | 240 ++++ docs/manual/mod/mod_macro.html.fr | 238 ++++ docs/manual/mod/mod_mime.html | 4 + docs/manual/mod/mod_mime.html.en | 2 + docs/manual/mod/mod_mime.html.fr | 1146 +++++++++++++++ docs/manual/mod/mod_mime.html.ja.utf8 | 2 + docs/manual/mod/mod_mime_magic.html | 4 + docs/manual/mod/mod_mime_magic.html.en | 6 +- docs/manual/mod/mod_mime_magic.html.fr | 310 +++++ docs/manual/mod/mod_proxy.html.en | 93 +- docs/manual/mod/mod_proxy.html.fr | 98 +- docs/manual/mod/mod_proxy.html.ja.utf8 | 30 + docs/manual/mod/mod_proxy_balancer.html.en | 30 +- docs/manual/mod/mod_proxy_balancer.html.fr | 26 +- docs/manual/mod/mod_proxy_fcgi.html.en | 4 +- docs/manual/mod/mod_proxy_fcgi.html.fr | 4 +- docs/manual/mod/mod_proxy_html.html.fr | 39 +- docs/manual/mod/mod_proxy_scgi.html.en | 6 +- docs/manual/mod/mod_proxy_scgi.html.fr | 6 +- docs/manual/mod/mod_proxy_wstunnel.html | 5 + docs/manual/mod/mod_proxy_wstunnel.html.en | 90 ++ docs/manual/mod/mod_reqtimeout.html | 4 + docs/manual/mod/mod_reqtimeout.html.en | 6 +- docs/manual/mod/mod_reqtimeout.html.fr | 219 +++ docs/manual/mod/mod_rewrite.html.en | 15 +- docs/manual/mod/mod_rewrite.html.fr | 15 +- docs/manual/mod/mod_session_cookie.html | 4 + docs/manual/mod/mod_session_cookie.html.en | 6 +- docs/manual/mod/mod_session_cookie.html.fr | 221 +++ docs/manual/mod/mod_session_crypto.html | 4 + docs/manual/mod/mod_session_crypto.html.en | 6 +- docs/manual/mod/mod_session_crypto.html.fr | 291 ++++ docs/manual/mod/mod_session_dbd.html | 4 + docs/manual/mod/mod_session_dbd.html.en | 8 +- docs/manual/mod/mod_session_dbd.html.fr | 415 ++++++ docs/manual/mod/mod_setenvif.html.en | 2 +- docs/manual/mod/mod_setenvif.html.tr.utf8 | 91 +- docs/manual/mod/mod_slotmem_plain.html | 4 + docs/manual/mod/mod_slotmem_plain.html.en | 6 +- docs/manual/mod/mod_slotmem_plain.html.fr | 124 ++ docs/manual/mod/mod_slotmem_shm.html | 4 + docs/manual/mod/mod_slotmem_shm.html.en | 6 +- docs/manual/mod/mod_slotmem_shm.html.fr | 142 ++ docs/manual/mod/mod_so.html.tr.utf8 | 15 +- docs/manual/mod/mod_socache_dbm.html | 4 + docs/manual/mod/mod_socache_dbm.html.en | 6 +- docs/manual/mod/mod_socache_dbm.html.fr | 82 ++ docs/manual/mod/mod_socache_dc.html | 4 + docs/manual/mod/mod_socache_dc.html.en | 6 +- docs/manual/mod/mod_socache_dc.html.fr | 79 ++ docs/manual/mod/mod_socache_memcache.html | 4 + docs/manual/mod/mod_socache_memcache.html.en | 6 +- docs/manual/mod/mod_socache_memcache.html.fr | 91 ++ docs/manual/mod/mod_socache_shmcb.html | 4 + docs/manual/mod/mod_socache_shmcb.html.en | 6 +- docs/manual/mod/mod_socache_shmcb.html.fr | 83 ++ docs/manual/mod/mod_ssl.html.en | 50 +- docs/manual/mod/mod_ssl.html.fr | 49 + docs/manual/mod/mod_status.html.fr | 2 +- docs/manual/mod/mod_status.html.tr.utf8 | 17 +- docs/manual/mod/mod_suexec.html | 4 + docs/manual/mod/mod_suexec.html.en | 2 + docs/manual/mod/mod_suexec.html.fr | 114 ++ docs/manual/mod/mod_suexec.html.ja.utf8 | 2 + docs/manual/mod/mod_suexec.html.ko.euc-kr | 2 + docs/manual/mod/mod_suexec.html.tr.utf8 | 15 +- docs/manual/mod/mod_unixd.html | 4 + docs/manual/mod/mod_unixd.html.en | 2 + docs/manual/mod/mod_unixd.html.fr | 227 +++ docs/manual/mod/mod_unixd.html.tr.utf8 | 15 +- docs/manual/mod/mod_userdir.html | 4 + docs/manual/mod/mod_userdir.html.en | 2 + docs/manual/mod/mod_userdir.html.fr | 230 ++++ docs/manual/mod/mod_userdir.html.ja.utf8 | 2 + docs/manual/mod/mod_userdir.html.ko.euc-kr | 2 + docs/manual/mod/mod_userdir.html.tr.utf8 | 26 +- docs/manual/mod/mod_usertrack.html | 4 + docs/manual/mod/mod_usertrack.html.en | 6 +- docs/manual/mod/mod_usertrack.html.fr | 259 ++++ docs/manual/mod/mod_vhost_alias.html | 4 + docs/manual/mod/mod_vhost_alias.html.en | 2 + docs/manual/mod/mod_vhost_alias.html.fr | 399 ++++++ docs/manual/mod/mod_vhost_alias.html.tr.utf8 | 93 +- docs/manual/mod/module-dict.html | 4 + docs/manual/mod/module-dict.html.en | 2 + docs/manual/mod/module-dict.html.fr | 145 ++ docs/manual/mod/module-dict.html.ja.utf8 | 2 + docs/manual/mod/module-dict.html.ko.euc-kr | 2 + docs/manual/mod/module-dict.html.tr.utf8 | 2 + docs/manual/mod/mpm_common.html.en | 1 + docs/manual/mod/mpm_common.html.fr | 3 +- docs/manual/mod/mpm_common.html.tr.utf8 | 60 +- docs/manual/mod/mpm_netware.html | 4 + docs/manual/mod/mpm_netware.html.en | 6 +- docs/manual/mod/mpm_netware.html.fr | 138 ++ docs/manual/mod/mpm_winnt.html | 4 + docs/manual/mod/mpm_winnt.html.de | 2 + docs/manual/mod/mpm_winnt.html.en | 2 + docs/manual/mod/mpm_winnt.html.fr | 161 +++ docs/manual/mod/mpm_winnt.html.ja.utf8 | 2 + docs/manual/mod/quickreference.html | 4 + docs/manual/mod/quickreference.html.de | 458 +++--- docs/manual/mod/quickreference.html.en | 458 +++--- docs/manual/mod/quickreference.html.es | 458 +++--- docs/manual/mod/quickreference.html.fr | 1361 ++++++++++++++++++ docs/manual/mod/quickreference.html.ja.utf8 | 454 +++--- docs/manual/mod/quickreference.html.ko.euc-kr | 456 +++--- docs/manual/mod/quickreference.html.tr.utf8 | 472 ++++--- docs/manual/mod/quickreference.html.zh-cn | 458 +++--- docs/manual/mod/worker.html.tr.utf8 | 18 +- docs/manual/new_features_2_4.html.fr | 6 +- docs/manual/new_features_2_4.html.tr.utf8 | 13 +- docs/manual/platform/index.html | 4 + docs/manual/platform/index.html.en | 2 + docs/manual/platform/index.html.fr | 128 ++ docs/manual/platform/index.html.ko.euc-kr | 2 + docs/manual/platform/index.html.zh-cn | 2 + docs/manual/platform/netware.html | 4 + docs/manual/platform/netware.html.en | 2 + docs/manual/platform/netware.html.fr | 761 ++++++++++ docs/manual/platform/netware.html.ko.euc-kr | 2 + docs/manual/platform/perf-hp.html | 4 + docs/manual/platform/perf-hp.html.en | 2 + docs/manual/platform/perf-hp.html.fr | 143 ++ docs/manual/platform/perf-hp.html.ko.euc-kr | 2 + docs/manual/platform/win_compiling.html | 4 + docs/manual/platform/win_compiling.html.en | 33 + docs/manual/platform/win_compiling.html.fr | 519 +++++++ docs/manual/platform/win_compiling.html.ko.euc-kr | 2 + docs/manual/platform/windows.html | 4 + docs/manual/platform/windows.html.en | 21 +- docs/manual/platform/windows.html.fr | 709 ++++++++++ docs/manual/platform/windows.html.ko.euc-kr | 2 + docs/manual/programs/ab.html.tr.utf8 | 12 +- docs/manual/programs/apxs.html.en | 5 + docs/manual/programs/apxs.html.fr | 5 + docs/manual/programs/apxs.html.tr.utf8 | 1 + docs/manual/programs/dbmmanage.html.tr.utf8 | 6 +- docs/manual/programs/fcgistarter.html.en | 4 +- docs/manual/programs/fcgistarter.html.tr.utf8 | 1 + docs/manual/programs/htdbm.html.tr.utf8 | 94 +- docs/manual/programs/htdigest.html.tr.utf8 | 5 +- docs/manual/programs/htpasswd.html.en | 16 +- docs/manual/programs/htpasswd.html.fr | 15 +- docs/manual/programs/htpasswd.html.tr.utf8 | 68 +- docs/manual/programs/httxt2dbm.html.en | 6 +- docs/manual/programs/httxt2dbm.html.fr | 4 + docs/manual/programs/httxt2dbm.html.tr.utf8 | 3 + docs/manual/programs/other.html.tr.utf8 | 52 +- docs/manual/programs/rotatelogs.html.en | 6 + docs/manual/programs/rotatelogs.html.fr | 5 + docs/manual/programs/rotatelogs.html.tr.utf8 | 1 + docs/manual/programs/suexec.html.en | 2 +- docs/manual/programs/suexec.html.tr.utf8 | 1 + docs/manual/rewrite/access.html.en | 2 +- docs/manual/rewrite/avoid.html.en | 2 +- docs/manual/rewrite/avoid.html.fr | 2 +- docs/manual/rewrite/flags.html.en | 16 +- docs/manual/rewrite/index.html.tr.utf8 | 1 - docs/manual/sitemap.html.de | 3 + docs/manual/sitemap.html.en | 3 + docs/manual/sitemap.html.es | 3 + docs/manual/sitemap.html.fr | 5 +- docs/manual/sitemap.html.ja.utf8 | 3 + docs/manual/sitemap.html.ko.euc-kr | 3 + docs/manual/sitemap.html.tr.utf8 | 3 + docs/manual/sitemap.html.zh-cn | 3 + docs/manual/socache.html.en | 1 + docs/manual/socache.html.fr | 2 +- docs/manual/ssl/index.html.tr.utf8 | 4 +- docs/manual/style/css/prettify.css | 4 +- docs/manual/style/scripts/prettify.js | 2 +- docs/manual/style/version.ent | 2 +- docs/manual/upgrading.html.en | 15 + docs/manual/upgrading.html.fr | 33 +- docs/manual/urlmapping.html.en | 25 +- docs/manual/urlmapping.html.fr | 25 +- docs/manual/urlmapping.html.tr.utf8 | 1 + docs/manual/vhosts/details.html.tr.utf8 | 5 +- docs/manual/vhosts/examples.html.tr.utf8 | 554 ++++---- docs/manual/vhosts/fd-limits.html.tr.utf8 | 10 +- docs/manual/vhosts/ip-based.html.tr.utf8 | 47 +- docs/manual/vhosts/mass.html.tr.utf8 | 154 +-- docs/manual/vhosts/name-based.html.en | 12 + docs/manual/vhosts/name-based.html.fr | 16 + docs/manual/vhosts/name-based.html.tr.utf8 | 42 +- httpd.spec | 6 +- include/ap_mmn.h | 21 +- include/ap_release.h | 18 +- include/heartbeat.h | 5 + include/http_protocol.h | 66 + include/http_request.h | 19 + include/httpd.h | 50 +- include/util_filter.h | 23 +- libhttpd.dsp | 2 + modules/NWGNUmakefile | 6 +- modules/aaa/mod_access_compat.c | 10 +- modules/aaa/mod_auth_basic.c | 155 ++- modules/aaa/mod_auth_digest.c | 68 +- modules/aaa/mod_auth_form.c | 1 - modules/aaa/mod_authn_file.c | 16 +- modules/aaa/mod_authnz_ldap.c | 42 +- modules/aaa/mod_authz_groupfile.c | 18 +- modules/aaa/mod_authz_host.c | 6 +- modules/arch/netware/mod_netware.c | 2 +- modules/arch/win32/mod_isapi.h | 2 +- modules/cache/NWGNUcach_socache | 262 ++++ modules/cache/NWGNUmakefile | 1 + modules/cache/cache_common.h | 1 + modules/cache/cache_socache_common.h | 57 + modules/cache/cache_storage.c | 394 ++++-- modules/cache/cache_storage.h | 23 +- modules/cache/cache_util.c | 365 +++-- modules/cache/cache_util.h | 31 +- modules/cache/config.m4 | 3 + modules/cache/mod_cache.c | 393 ++++-- modules/cache/mod_cache_disk.c | 170 ++- modules/cache/mod_cache_socache.c | 1501 ++++++++++++++++++++ modules/cache/mod_cache_socache.dsp | 115 ++ modules/cache/mod_socache_memcache.c | 8 +- modules/cluster/mod_heartmonitor.c | 4 +- modules/core/NWGNUmakefile | 257 ++++ modules/core/config.m4 | 2 + modules/core/mod_macro.c | 953 +++++++++++++ modules/core/mod_macro.dsp | 111 ++ modules/core/test/Makefile | 69 + modules/core/test/conf/inc63_1.conf | 5 + modules/core/test/conf/inc63_2.conf | 3 + modules/core/test/conf/test01.conf | 3 + modules/core/test/conf/test02.conf | 3 + modules/core/test/conf/test03.conf | 5 + modules/core/test/conf/test04.conf | 5 + modules/core/test/conf/test05.conf | 5 + modules/core/test/conf/test06.conf | 6 + modules/core/test/conf/test07.conf | 3 + modules/core/test/conf/test08.conf | 3 + modules/core/test/conf/test09.conf | 6 + modules/core/test/conf/test10.conf | 10 + modules/core/test/conf/test11.conf | 15 + modules/core/test/conf/test12.conf | 12 + modules/core/test/conf/test13.conf | 18 + modules/core/test/conf/test14.conf | 23 + modules/core/test/conf/test15.conf | 9 + modules/core/test/conf/test16.conf | 11 + modules/core/test/conf/test17.conf | 10 + modules/core/test/conf/test18.conf | 10 + modules/core/test/conf/test19.conf | 26 + modules/core/test/conf/test20.conf | 11 + modules/core/test/conf/test21.conf | 11 + modules/core/test/conf/test22.conf | 11 + modules/core/test/conf/test23.conf | 15 + modules/core/test/conf/test24.conf | 23 + modules/core/test/conf/test25.conf | 27 + modules/core/test/conf/test26.conf | 19 + modules/core/test/conf/test27.conf | 22 + modules/core/test/conf/test28.conf | 13 + modules/core/test/conf/test29.conf | 10 + modules/core/test/conf/test30.conf | 12 + modules/core/test/conf/test31.conf | 16 + modules/core/test/conf/test32.conf | 7 + modules/core/test/conf/test33.conf | 3 + modules/core/test/conf/test34.conf | 14 + modules/core/test/conf/test35.conf | 10 + modules/core/test/conf/test36.conf | 12 + modules/core/test/conf/test37.conf | 7 + modules/core/test/conf/test38.conf | 10 + modules/core/test/conf/test39.conf | 23 + modules/core/test/conf/test40.conf | 33 + modules/core/test/conf/test41.conf | 20 + modules/core/test/conf/test42.conf | 13 + modules/core/test/conf/test43.conf | 29 + modules/core/test/conf/test44.conf | 19 + modules/core/test/conf/test45.conf | 7 + modules/core/test/conf/test46.conf | 11 + modules/core/test/conf/test47.conf | 15 + modules/core/test/conf/test48.conf | 23 + modules/core/test/conf/test49.conf | 2 + modules/core/test/conf/test50.conf | 5 + modules/core/test/conf/test51.conf | 9 + modules/core/test/conf/test52.conf | 8 + modules/core/test/conf/test53.conf | 2 + modules/core/test/conf/test54.conf | 6 + modules/core/test/conf/test55.conf | 11 + modules/core/test/conf/test56.conf | 18 + modules/core/test/conf/test57.conf | 4 + modules/core/test/conf/test58.conf | 4 + modules/core/test/conf/test59.conf | 4 + modules/core/test/conf/test60.conf | 17 + modules/core/test/conf/test61.conf | 18 + modules/core/test/conf/test62.conf | 25 + modules/core/test/conf/test63.conf | 9 + modules/core/test/conf/test64.conf | 5 + modules/core/test/conf/test65.conf | 11 + modules/core/test/conf/test66.conf | 7 + modules/core/test/conf/test67.conf | 1 + modules/core/test/conf/test68.conf | 5 + modules/core/test/conf/test69.conf | 14 + modules/core/test/ref/test01.out | 3 + modules/core/test/ref/test02.out | 3 + modules/core/test/ref/test03.out | 3 + modules/core/test/ref/test04.out | 3 + modules/core/test/ref/test05.out | 3 + modules/core/test/ref/test06.out | 3 + modules/core/test/ref/test07.out | 3 + modules/core/test/ref/test08.out | 3 + modules/core/test/ref/test09.out | 3 + modules/core/test/ref/test10.out | 3 + modules/core/test/ref/test11.out | 6 + modules/core/test/ref/test12.out | 7 + modules/core/test/ref/test13.out | 8 + modules/core/test/ref/test14.out | 14 + modules/core/test/ref/test15.out | 6 + modules/core/test/ref/test16.out | 5 + modules/core/test/ref/test17.out | 7 + modules/core/test/ref/test18.out | 7 + modules/core/test/ref/test19.out | 9 + modules/core/test/ref/test20.out | 4 + modules/core/test/ref/test21.out | 5 + modules/core/test/ref/test22.out | 6 + modules/core/test/ref/test23.out | 7 + modules/core/test/ref/test24.out | 8 + modules/core/test/ref/test25.out | 9 + modules/core/test/ref/test26.out | 11 + modules/core/test/ref/test27.out | 8 + modules/core/test/ref/test28.out | 6 + modules/core/test/ref/test29.out | 4 + modules/core/test/ref/test30.out | 7 + modules/core/test/ref/test31.out | 23 + modules/core/test/ref/test32.out | 3 + modules/core/test/ref/test33.out | 3 + modules/core/test/ref/test34.out | 13 + modules/core/test/ref/test35.out | 13 + modules/core/test/ref/test36.out | 20 + modules/core/test/ref/test37.out | 3 + modules/core/test/ref/test38.out | 6 + modules/core/test/ref/test39.out | 7 + modules/core/test/ref/test40.out | 18 + modules/core/test/ref/test41.out | 9 + modules/core/test/ref/test42.out | 15 + modules/core/test/ref/test43.out | 8 + modules/core/test/ref/test44.out | 5 + modules/core/test/ref/test45.out | 19 + modules/core/test/ref/test46.out | 9 + modules/core/test/ref/test47.out | 8 + modules/core/test/ref/test48.out | 20 + modules/core/test/ref/test49.out | 3 + modules/core/test/ref/test50.out | 3 + modules/core/test/ref/test51.out | 3 + modules/core/test/ref/test52.out | 6 + modules/core/test/ref/test53.out | 3 + modules/core/test/ref/test54.out | 6 + modules/core/test/ref/test55.out | 8 + modules/core/test/ref/test56.out | 12 + modules/core/test/ref/test57.out | 3 + modules/core/test/ref/test58.out | 3 + modules/core/test/ref/test59.out | 3 + modules/core/test/ref/test60.out | 15 + modules/core/test/ref/test61.out | 9 + modules/core/test/ref/test62.out | 15 + modules/core/test/ref/test63.out | 10 + modules/core/test/ref/test64.out | 7 + modules/core/test/ref/test65.out | 7 + modules/core/test/ref/test66.out | 7 + modules/core/test/ref/test67.out | 5 + modules/core/test/ref/test68.out | 6 + modules/core/test/ref/test69.out | 10 + modules/dav/fs/dbm.c | 14 +- modules/dav/main/mod_dav.c | 68 +- modules/dav/main/mod_dav.h | 15 + modules/dav/main/props.c | 8 +- modules/dav/main/util.c | 36 +- modules/filters/mod_charset_lite.c | 16 +- modules/filters/mod_deflate.c | 45 +- modules/filters/mod_ext_filter.c | 5 +- modules/filters/mod_include.c | 5 +- modules/filters/mod_proxy_html.c | 8 +- modules/filters/mod_ratelimit.c | 22 +- modules/filters/regexp.h | 3 +- modules/filters/sed0.c | 2 +- modules/generators/mod_autoindex.c | 8 +- modules/generators/mod_cgi.c | 5 +- modules/generators/mod_status.c | 47 +- modules/http/byterange_filter.c | 17 +- modules/http/http_filters.c | 2 +- modules/http/http_protocol.c | 326 ++++- modules/loggers/mod_log_config.c | 4 + modules/loggers/mod_log_forensic.c | 2 +- modules/lua/NWGNUmakefile | 11 +- modules/lua/README | 10 +- modules/lua/config.m4 | 2 +- modules/lua/lua_apr.c | 35 +- modules/lua/lua_apr.h | 17 +- modules/lua/lua_config.c | 4 +- modules/lua/lua_config.h | 4 +- modules/lua/lua_dbd.c | 7 +- modules/lua/lua_dbd.h | 2 +- modules/lua/lua_passwd.c | 178 +++ modules/lua/lua_passwd.h | 91 ++ modules/lua/lua_request.c | 1533 ++++++++++++++++++++- modules/lua/lua_request.h | 20 +- modules/lua/lua_vmprep.c | 198 ++- modules/lua/lua_vmprep.h | 53 +- modules/lua/mod_lua.c | 660 ++++++++- modules/lua/mod_lua.dsp | 8 + modules/lua/mod_lua.h | 19 +- modules/mappers/mod_imagemap.c | 2 +- modules/mappers/mod_negotiation.c | 8 +- modules/mappers/mod_rewrite.c | 2 +- modules/metadata/mod_cern_meta.c | 2 +- modules/metadata/mod_headers.c | 2 +- modules/metadata/mod_remoteip.c | 13 +- modules/metadata/mod_setenvif.c | 2 +- modules/proxy/NWGNUmakefile | 1 + modules/proxy/NWGNUproxy | 4 +- modules/proxy/NWGNUproxywstunnel | 250 ++++ modules/proxy/ajp_utils.c | 2 +- modules/proxy/balancers/mod_lbmethod_heartbeat.c | 4 +- modules/proxy/config.m4 | 3 + modules/proxy/mod_proxy.c | 110 +- modules/proxy/mod_proxy.h | 57 +- modules/proxy/mod_proxy_balancer.c | 20 +- modules/proxy/mod_proxy_http.c | 364 +---- modules/proxy/mod_proxy_wstunnel.c | 399 ++++++ modules/proxy/mod_proxy_wstunnel.dsp | 123 ++ modules/proxy/proxy_util.c | 372 ++++- modules/session/NWGNUmakefile | 4 +- modules/session/mod_session.c | 3 +- modules/session/mod_session_cookie.c | 1 - modules/session/mod_session_crypto.c | 5 +- modules/session/mod_session_dbd.c | 82 +- modules/slotmem/mod_slotmem_shm.c | 4 +- modules/ssl/mod_ssl.c | 7 +- modules/ssl/ssl_engine_config.c | 11 + modules/ssl/ssl_engine_init.c | 81 +- modules/ssl/ssl_engine_io.c | 43 +- modules/ssl/ssl_private.h | 2 + modules/ssl/ssl_util_ocsp.c | 8 +- modules/ssl/ssl_util_ssl.c | 93 +- modules/ssl/ssl_util_ssl.h | 1 + modules/ssl/ssl_util_stapling.c | 2 +- os/unix/unixd.c | 2 +- os/win32/BaseAddr.ref | 47 +- server/config.c | 23 +- server/core.c | 22 +- server/log.c | 29 +- server/mpm/event/event.c | 11 +- server/mpm/worker/worker.c | 8 +- server/protocol.c | 10 +- server/request.c | 23 +- server/util.c | 145 +- server/util_expr_eval.c | 45 +- server/util_filter.c | 57 + server/util_script.c | 2 +- support/htdbm.c | 1 + support/htdigest.c | 16 +- support/htpasswd.c | 147 +- support/httxt2dbm.c | 31 +- support/passwd_common.c | 68 +- support/passwd_common.h | 15 +- support/rotatelogs.c | 39 +- support/suexec.c | 15 +- test/test_limits.c | 4 +- 587 files changed, 31710 insertions(+), 5464 deletions(-) create mode 100644 docs/manual/mod/mod_cache_socache.html create mode 100644 docs/manual/mod/mod_cache_socache.html.en create mode 100644 docs/manual/mod/mod_heartbeat.html.fr create mode 100644 docs/manual/mod/mod_heartmonitor.html.fr create mode 100644 docs/manual/mod/mod_imagemap.html.fr create mode 100644 docs/manual/mod/mod_include.html.fr create mode 100644 docs/manual/mod/mod_log_config.html.fr create mode 100644 docs/manual/mod/mod_log_debug.html.fr create mode 100644 docs/manual/mod/mod_macro.html create mode 100644 docs/manual/mod/mod_macro.html.en create mode 100644 docs/manual/mod/mod_macro.html.fr create mode 100644 docs/manual/mod/mod_mime.html.fr create mode 100644 docs/manual/mod/mod_mime_magic.html.fr create mode 100644 docs/manual/mod/mod_proxy_wstunnel.html create mode 100644 docs/manual/mod/mod_proxy_wstunnel.html.en create mode 100644 docs/manual/mod/mod_reqtimeout.html.fr create mode 100644 docs/manual/mod/mod_session_cookie.html.fr create mode 100644 docs/manual/mod/mod_session_crypto.html.fr create mode 100644 docs/manual/mod/mod_session_dbd.html.fr create mode 100644 docs/manual/mod/mod_slotmem_plain.html.fr create mode 100644 docs/manual/mod/mod_slotmem_shm.html.fr create mode 100644 docs/manual/mod/mod_socache_dbm.html.fr create mode 100644 docs/manual/mod/mod_socache_dc.html.fr create mode 100644 docs/manual/mod/mod_socache_memcache.html.fr create mode 100644 docs/manual/mod/mod_socache_shmcb.html.fr create mode 100644 docs/manual/mod/mod_suexec.html.fr create mode 100644 docs/manual/mod/mod_unixd.html.fr create mode 100644 docs/manual/mod/mod_userdir.html.fr create mode 100644 docs/manual/mod/mod_usertrack.html.fr create mode 100644 docs/manual/mod/mod_vhost_alias.html.fr create mode 100644 docs/manual/mod/module-dict.html.fr create mode 100644 docs/manual/mod/mpm_netware.html.fr create mode 100644 docs/manual/mod/mpm_winnt.html.fr create mode 100644 docs/manual/mod/quickreference.html.fr create mode 100644 docs/manual/platform/index.html.fr create mode 100644 docs/manual/platform/netware.html.fr create mode 100644 docs/manual/platform/perf-hp.html.fr create mode 100644 docs/manual/platform/win_compiling.html.fr create mode 100644 docs/manual/platform/windows.html.fr create mode 100644 modules/cache/NWGNUcach_socache create mode 100644 modules/cache/cache_socache_common.h create mode 100644 modules/cache/mod_cache_socache.c create mode 100644 modules/cache/mod_cache_socache.dsp create mode 100644 modules/core/NWGNUmakefile create mode 100644 modules/core/mod_macro.c create mode 100644 modules/core/mod_macro.dsp create mode 100755 modules/core/test/Makefile create mode 100644 modules/core/test/conf/inc63_1.conf create mode 100644 modules/core/test/conf/inc63_2.conf create mode 100755 modules/core/test/conf/test01.conf create mode 100755 modules/core/test/conf/test02.conf create mode 100755 modules/core/test/conf/test03.conf create mode 100755 modules/core/test/conf/test04.conf create mode 100755 modules/core/test/conf/test05.conf create mode 100755 modules/core/test/conf/test06.conf create mode 100755 modules/core/test/conf/test07.conf create mode 100755 modules/core/test/conf/test08.conf create mode 100755 modules/core/test/conf/test09.conf create mode 100755 modules/core/test/conf/test10.conf create mode 100755 modules/core/test/conf/test11.conf create mode 100755 modules/core/test/conf/test12.conf create mode 100755 modules/core/test/conf/test13.conf create mode 100755 modules/core/test/conf/test14.conf create mode 100755 modules/core/test/conf/test15.conf create mode 100755 modules/core/test/conf/test16.conf create mode 100755 modules/core/test/conf/test17.conf create mode 100755 modules/core/test/conf/test18.conf create mode 100755 modules/core/test/conf/test19.conf create mode 100755 modules/core/test/conf/test20.conf create mode 100755 modules/core/test/conf/test21.conf create mode 100755 modules/core/test/conf/test22.conf create mode 100755 modules/core/test/conf/test23.conf create mode 100755 modules/core/test/conf/test24.conf create mode 100755 modules/core/test/conf/test25.conf create mode 100755 modules/core/test/conf/test26.conf create mode 100755 modules/core/test/conf/test27.conf create mode 100755 modules/core/test/conf/test28.conf create mode 100755 modules/core/test/conf/test29.conf create mode 100755 modules/core/test/conf/test30.conf create mode 100755 modules/core/test/conf/test31.conf create mode 100755 modules/core/test/conf/test32.conf create mode 100755 modules/core/test/conf/test33.conf create mode 100755 modules/core/test/conf/test34.conf create mode 100755 modules/core/test/conf/test35.conf create mode 100755 modules/core/test/conf/test36.conf create mode 100755 modules/core/test/conf/test37.conf create mode 100755 modules/core/test/conf/test38.conf create mode 100755 modules/core/test/conf/test39.conf create mode 100755 modules/core/test/conf/test40.conf create mode 100755 modules/core/test/conf/test41.conf create mode 100755 modules/core/test/conf/test42.conf create mode 100755 modules/core/test/conf/test43.conf create mode 100755 modules/core/test/conf/test44.conf create mode 100755 modules/core/test/conf/test45.conf create mode 100755 modules/core/test/conf/test46.conf create mode 100755 modules/core/test/conf/test47.conf create mode 100755 modules/core/test/conf/test48.conf create mode 100644 modules/core/test/conf/test49.conf create mode 100644 modules/core/test/conf/test50.conf create mode 100644 modules/core/test/conf/test51.conf create mode 100644 modules/core/test/conf/test52.conf create mode 100755 modules/core/test/conf/test53.conf create mode 100644 modules/core/test/conf/test54.conf create mode 100644 modules/core/test/conf/test55.conf create mode 100644 modules/core/test/conf/test56.conf create mode 100644 modules/core/test/conf/test57.conf create mode 100644 modules/core/test/conf/test58.conf create mode 100644 modules/core/test/conf/test59.conf create mode 100644 modules/core/test/conf/test60.conf create mode 100644 modules/core/test/conf/test61.conf create mode 100644 modules/core/test/conf/test62.conf create mode 100644 modules/core/test/conf/test63.conf create mode 100644 modules/core/test/conf/test64.conf create mode 100644 modules/core/test/conf/test65.conf create mode 100644 modules/core/test/conf/test66.conf create mode 100644 modules/core/test/conf/test67.conf create mode 100644 modules/core/test/conf/test68.conf create mode 100644 modules/core/test/conf/test69.conf create mode 100644 modules/core/test/ref/test01.out create mode 100644 modules/core/test/ref/test02.out create mode 100644 modules/core/test/ref/test03.out create mode 100644 modules/core/test/ref/test04.out create mode 100644 modules/core/test/ref/test05.out create mode 100644 modules/core/test/ref/test06.out create mode 100644 modules/core/test/ref/test07.out create mode 100644 modules/core/test/ref/test08.out create mode 100644 modules/core/test/ref/test09.out create mode 100644 modules/core/test/ref/test10.out create mode 100644 modules/core/test/ref/test11.out create mode 100644 modules/core/test/ref/test12.out create mode 100644 modules/core/test/ref/test13.out create mode 100644 modules/core/test/ref/test14.out create mode 100644 modules/core/test/ref/test15.out create mode 100644 modules/core/test/ref/test16.out create mode 100644 modules/core/test/ref/test17.out create mode 100644 modules/core/test/ref/test18.out create mode 100644 modules/core/test/ref/test19.out create mode 100644 modules/core/test/ref/test20.out create mode 100644 modules/core/test/ref/test21.out create mode 100644 modules/core/test/ref/test22.out create mode 100644 modules/core/test/ref/test23.out create mode 100644 modules/core/test/ref/test24.out create mode 100644 modules/core/test/ref/test25.out create mode 100644 modules/core/test/ref/test26.out create mode 100644 modules/core/test/ref/test27.out create mode 100644 modules/core/test/ref/test28.out create mode 100644 modules/core/test/ref/test29.out create mode 100644 modules/core/test/ref/test30.out create mode 100644 modules/core/test/ref/test31.out create mode 100644 modules/core/test/ref/test32.out create mode 100644 modules/core/test/ref/test33.out create mode 100644 modules/core/test/ref/test34.out create mode 100644 modules/core/test/ref/test35.out create mode 100644 modules/core/test/ref/test36.out create mode 100644 modules/core/test/ref/test37.out create mode 100644 modules/core/test/ref/test38.out create mode 100644 modules/core/test/ref/test39.out create mode 100644 modules/core/test/ref/test40.out create mode 100644 modules/core/test/ref/test41.out create mode 100644 modules/core/test/ref/test42.out create mode 100644 modules/core/test/ref/test43.out create mode 100644 modules/core/test/ref/test44.out create mode 100644 modules/core/test/ref/test45.out create mode 100644 modules/core/test/ref/test46.out create mode 100644 modules/core/test/ref/test47.out create mode 100644 modules/core/test/ref/test48.out create mode 100644 modules/core/test/ref/test49.out create mode 100644 modules/core/test/ref/test50.out create mode 100644 modules/core/test/ref/test51.out create mode 100644 modules/core/test/ref/test52.out create mode 100644 modules/core/test/ref/test53.out create mode 100644 modules/core/test/ref/test54.out create mode 100644 modules/core/test/ref/test55.out create mode 100644 modules/core/test/ref/test56.out create mode 100644 modules/core/test/ref/test57.out create mode 100644 modules/core/test/ref/test58.out create mode 100644 modules/core/test/ref/test59.out create mode 100644 modules/core/test/ref/test60.out create mode 100644 modules/core/test/ref/test61.out create mode 100644 modules/core/test/ref/test62.out create mode 100644 modules/core/test/ref/test63.out create mode 100644 modules/core/test/ref/test64.out create mode 100644 modules/core/test/ref/test65.out create mode 100644 modules/core/test/ref/test66.out create mode 100644 modules/core/test/ref/test67.out create mode 100644 modules/core/test/ref/test68.out create mode 100644 modules/core/test/ref/test69.out create mode 100644 modules/lua/lua_passwd.c create mode 100644 modules/lua/lua_passwd.h create mode 100644 modules/proxy/NWGNUproxywstunnel create mode 100644 modules/proxy/mod_proxy_wstunnel.c create mode 100644 modules/proxy/mod_proxy_wstunnel.dsp diff --git a/Apache-apr2.dsw b/Apache-apr2.dsw index 776ec00b..da295a5d 100644 --- a/Apache-apr2.dsw +++ b/Apache-apr2.dsw @@ -162,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 @@ -249,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 @@ -282,6 +288,9 @@ Package=<4> 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 @@ -1510,6 +1519,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> @@ -2050,6 +2080,24 @@ Package=<4> ############################################################################### +Project: "mod_macro"=.\modules\core\mod_macro.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_mime"=.\modules\http\mod_mime.dsp - Package Owner=<4> Package=<5> @@ -2308,6 +2356,27 @@ Package=<4> }}} +############################################################################### + +Project: "mod_proxy_wstunnel"=.\modules\proxy\mod_proxy_wstunnel.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_ratelimit"=.\modules\filters\mod_ratelimit.dsp - Package Owner=<4> diff --git a/Apache.dsw b/Apache.dsw index 2ec65abf..9ea521ca 100644 --- a/Apache.dsw +++ b/Apache.dsw @@ -177,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 @@ -264,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 @@ -297,6 +303,9 @@ Package=<4> 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 @@ -1795,6 +1804,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> @@ -2416,6 +2449,27 @@ Package=<4> ############################################################################### +Project: "mod_macro"=.\modules\core\mod_macro.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_mime"=.\modules\http\mod_mime.dsp - Package Owner=<4> Package=<5> @@ -2714,6 +2768,30 @@ Package=<4> ############################################################################### +Project: "mod_proxy_wstunnel"=.\modules\proxy\mod_proxy_wstunnel.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_ratelimit"=.\modules\filters\mod_ratelimit.dsp - Package Owner=<4> Package=<5> diff --git a/CHANGES b/CHANGES index 7688dbb7..19e600fe 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,272 @@ -*- coding: utf-8 -*- +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] + + *) 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 roate 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 ] + + *) '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 managable 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) @@ -13,20 +280,17 @@ Changes with Apache 2.4.4 *) 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_status: Print out list of times since a Vhost was last used. - [Jim Jagielski] - *) mod_proxy: Fix startup crash with mis-defined balancers. PR 52402. [Jim Jagielski] @@ -65,7 +329,7 @@ Changes with Apache 2.4.4 *) 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] @@ -76,7 +340,7 @@ Changes with Apache 2.4.4 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 ] @@ -527,7 +791,7 @@ Changes with Apache 2.4.0 *) SECURITY: CVE-2012-0031 (cve.mitre.org) Fix scoreboard issue which could allow an unprivileged child process - could cause the parent to crash at shutdown rather than terminate + 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] diff --git a/Makefile.win b/Makefile.win index 3437bcd3..ec5889ec 100644 --- a/Makefile.win +++ b/Makefile.win @@ -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 @@ -407,6 +407,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) @@ -414,6 +415,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 @@ -524,6 +526,7 @@ _build: $(MAKE) $(MAKEOPT) -f mod_proxy_ftp.mak CFG="mod_proxy_ftp - 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) + $(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) @@ -689,11 +692,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 @@ -783,6 +788,7 @@ _copybin: copy modules\proxy\$(LONG)\mod_proxy_ftp.$(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 + 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 diff --git a/build/NWGNUhead.inc b/build/NWGNUhead.inc index 78a96db7..2ef4dace 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/NWGNUtail.inc b/build/NWGNUtail.inc index 0c4a92d5..db38ff61 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 diff --git a/build/config.guess b/build/config.guess index 40eaed48..2055429b 100755 --- a/build/config.guess +++ b/build/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2013-04-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ timestamp='2011-05-11' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +137,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -202,6 +194,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -304,7 +300,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -792,21 +788,26 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +862,13 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -875,6 +883,9 @@ EOF if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -895,13 +906,16 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -910,6 +924,11 @@ EOF #ifdef __dietlibc__ LIBC=dietlibc #endif + #else + #include + #ifdef __UCLIBC__ + LIBC=uclibc + #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" @@ -942,8 +961,11 @@ EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +1000,15 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + LIBC=gnu + test -r /lib/libc.so && od -An -S13 /lib/libc.so | grep -q __uClibc_main && LIBC=uclibc + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1191,6 +1215,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1246,7 +1273,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1315,11 +1342,11 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -75,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -125,13 +116,17 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -154,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -223,6 +218,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,20 +248,27 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -278,20 +286,21 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +309,7 @@ case $basic_machine in | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +324,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +337,10 @@ case $basic_machine in strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +363,13 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,12 +378,15 @@ case $basic_machine in | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -388,19 +404,20 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +425,11 @@ case $basic_machine in | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +729,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -769,9 +786,13 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -808,10 +829,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -992,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1120,13 +1153,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1324,21 +1352,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1470,9 +1498,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1521,6 +1546,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1548,9 +1576,6 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout @@ -1564,6 +1589,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/build/installwinconf.awk b/build/installwinconf.awk index 7147ecdd..d8db0fc6 100644 --- a/build/installwinconf.awk +++ b/build/installwinconf.awk @@ -47,12 +47,12 @@ BEGIN { } 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 " DomainName = " domainname >tstfl; + print " ServerName = " servername >tstfl; + print " ServerAdmin = " serveradmin >tstfl; + print " ServerPort = " serverport >tstfl; print " ServerSslPort = " serversslport >tstfl; - print " ServerRoot = " serverroot >tstfl; + print " ServerRoot = " serverroot >tstfl; filelist["httpd.conf"] = "httpd.conf.in"; filelist["httpd-autoindex.conf"] = "httpd-autoindex.conf.in"; @@ -99,6 +99,7 @@ BEGIN { 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; @@ -117,6 +118,7 @@ BEGIN { 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; @@ -151,6 +153,7 @@ BEGIN { 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; @@ -164,6 +167,7 @@ BEGIN { 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 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; diff --git a/build/mkconfNW.awk b/build/mkconfNW.awk index a9be017c..c0028cef 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,6 +38,10 @@ 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" @@ -143,7 +146,7 @@ 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 " diff --git a/build/nw_ver.awk b/build/nw_ver.awk index 385cd658..22c7bc43 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/httpd.spec.in b/build/rpm/httpd.spec.in index c0ba1439..5a966d29 100644 --- a/build/rpm/httpd.spec.in +++ b/build/rpm/httpd.spec.in @@ -13,7 +13,7 @@ License: Apache License, Version 2.0 Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: autoconf, perl, pkgconfig, findutils -BuildRequires: zlib-devel, libselinux-devel +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 @@ -332,6 +332,7 @@ rm -rf $RPM_BUILD_ROOT %{_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 @@ -365,6 +366,7 @@ rm -rf $RPM_BUILD_ROOT %{_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 diff --git a/configure b/configure index 5a63ddd5..67cbff2d 100755 --- a/configure +++ b/configure @@ -751,6 +751,7 @@ MOD_SESSION_LDADD MOD_PROXY_EXPRESS_LDADD MOD_PROXY_BALANCER_LDADD MOD_PROXY_AJP_LDADD +MOD_PROXY_WSTUNNEL_LDADD MOD_PROXY_FDPASS_LDADD MOD_PROXY_SCGI_LDADD MOD_PROXY_FCGI_LDADD @@ -802,6 +803,7 @@ MOD_ECHO_LDADD MOD_DUMPIO_LDADD MOD_BUCKETEER_LDADD MOD_DBD_LDADD +MOD_MACRO_LDADD MOD_WATCHDOG_LDADD MOD_SO_LDADD INSTALL_DSO @@ -809,6 +811,7 @@ MOD_SOCACHE_DC_LDADD MOD_SOCACHE_MEMCACHE_LDADD MOD_SOCACHE_DBM_LDADD MOD_SOCACHE_SHMCB_LDADD +MOD_CACHE_SOCACHE_LDADD MOD_CACHE_DISK_LDADD MOD_CACHE_LDADD MOD_FILE_CACHE_LDADD @@ -993,6 +996,7 @@ enable_isapi enable_file_cache enable_cache enable_cache_disk +enable_cache_socache enable_socache_shmcb enable_socache_dbm enable_socache_memcache @@ -1000,6 +1004,7 @@ enable_socache_dc with_distcache enable_so enable_watchdog +enable_macro enable_dbd enable_bucketeer enable_dumpio @@ -1053,6 +1058,7 @@ enable_proxy_http enable_proxy_fcgi enable_proxy_scgi enable_proxy_fdpass +enable_proxy_wstunnel enable_proxy_ajp enable_proxy_balancer enable_proxy_express @@ -1791,6 +1797,7 @@ Optional Features: management module (e.g. mod_cache_disk) is also necessary. --enable-cache-disk disk caching module + --enable-cache-socache shared object caching module --enable-socache-shmcb shmcb small object cache provider --enable-socache-dbm dbm small object cache provider --enable-socache-memcache @@ -1799,6 +1806,7 @@ Optional Features: --enable-so DSO capability. This module will be automatically enabled unless you build all modules statically. --enable-watchdog Watchdog module + --enable-macro Define and use macros in configuration files --enable-dbd Apache DBD Framework --enable-bucketeer buckets manipulation filter. Useful only for developers and testing purposes. @@ -1868,6 +1876,8 @@ Optional Features: --enable-proxy. --enable-proxy-fdpass Apache proxy to Unix Daemon Socket module. Requires --enable-proxy. + --enable-proxy-wstunnel Apache proxy Websocket Tunnel module. Requires and + is enabled by --enable-proxy. --enable-proxy-ajp Apache proxy AJP module. Requires and is enabled by --enable-proxy. --enable-proxy-balancer Apache proxy BALANCER module. Requires and is @@ -6361,13 +6371,14 @@ case $host in ;; *-linux-*) case `uname -r` in - 2.[2-9]* ) + # Unserialized accept() was not recommended until Linux 2.2. + [01].* | 2.[01]* ) + ;; + * ) test "x$silent" != "xyes" && echo " forcing SINGLE_LISTEN_UNSERIALIZED_ACCEPT to \"1\"" SINGLE_LISTEN_UNSERIALIZED_ACCEPT="1" - ;; - * ) ;; esac ;; @@ -11770,12 +11781,14 @@ EOF cache_objs="mod_cache.lo cache_storage.lo cache_util.lo " 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 @@ -12069,6 +12082,140 @@ EOF fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_cache_socache" >&5 +$as_echo_n "checking whether to enable mod_cache_socache... " >&6; } + # Check whether --enable-cache-socache was given. +if test "${enable_cache_socache+set}" = set; then : + enableval=$enable_cache_socache; force_cache_socache=$enableval +else + enable_cache_socache=most +fi + + _apmod_extra_msg="" + case "$enable_cache_socache" in + yes|static|shared) + _apmod_required="yes" + ;; + *) + case "$module_selection" in + reallyall|all|most) + _apmod_required="no" + ;; + *) + _apmod_required="yes" + ;; + esac + esac + if test "$enable_cache_socache" = "static"; then + enable_cache_socache=static + elif test "$enable_cache_socache" = "yes"; then + enable_cache_socache=$module_default + elif test "$enable_cache_socache" = "most"; then + if test "$module_selection" = "most" -o "$module_selection" = "all" -o \ + "$module_selection" = "reallyall" + then + enable_cache_socache=$module_default + elif test "$module_selection" = "few" -o "$module_selection" = "none"; then + enable_cache_socache=no + fi + _apmod_extra_msg=" ($module_selection)" + elif test "$enable_cache_socache" = "maybe-all"; then + if test "$module_selection" = "all" -o "$module_selection" = "reallyall" + then + enable_cache_socache=$module_default + _apmod_extra_msg=" ($module_selection)" + else + enable_cache_socache=no + fi + elif test "$enable_cache_socache" = "no" -a "$module_selection" = "reallyall" -a \ + "$force_cache_socache" != "no" ; then + enable_cache_socache=$module_default + _apmod_extra_msg=" ($module_selection)" + fi + if test "$enable_cache_socache" != "no"; then + : + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cache_socache$_apmod_extra_msg" >&5 +$as_echo "$enable_cache_socache$_apmod_extra_msg" >&6; } + if test "$enable_cache_socache" != "no"; then + case "$enable_cache_socache" in + static*) + MODLIST="$MODLIST cache_socache" + if test "cache_socache" = "so"; then + sharedobjs=yes + fi + shared="";; + *) + enable_cache_socache=`echo $enable_cache_socache|sed 's/shared,*//'` + sharedobjs=yes + shared=yes + DSO_MODULES="$DSO_MODULES cache_socache" + if test "most" = "yes" ; then + ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},cache_socache" + fi + ;; + esac + + + if test -z "$cache_socache_objs"; then + objects="mod_cache_socache.lo" + else + objects="$cache_socache_objs" + fi + + if test -z "$module_standalone"; then + if test -z "$shared"; then + # The filename of a convenience library must have a "lib" prefix: + libname="libmod_cache_socache.la" + BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname" + modpath_static="$modpath_static $libname" + cat >>$modpath_current/modules.mk<>$modpath_current/modules.mk<&5 +$as_echo_n "checking whether to enable mod_macro... " >&6; } + # Check whether --enable-macro was given. +if test "${enable_macro+set}" = set; then : + enableval=$enable_macro; force_macro=$enableval +else + enable_macro=most +fi + + _apmod_extra_msg="" + case "$enable_macro" in + yes|static|shared) + _apmod_required="yes" + ;; + *) + case "$module_selection" in + reallyall|all|most) + _apmod_required="no" + ;; + *) + _apmod_required="yes" + ;; + esac + esac + if test "$enable_macro" = "static"; then + enable_macro=static + elif test "$enable_macro" = "yes"; then + enable_macro=$module_default + elif test "$enable_macro" = "most"; then + if test "$module_selection" = "most" -o "$module_selection" = "all" -o \ + "$module_selection" = "reallyall" + then + enable_macro=$module_default + elif test "$module_selection" = "few" -o "$module_selection" = "none"; then + enable_macro=no + fi + _apmod_extra_msg=" ($module_selection)" + elif test "$enable_macro" = "maybe-all"; then + if test "$module_selection" = "all" -o "$module_selection" = "reallyall" + then + enable_macro=$module_default + _apmod_extra_msg=" ($module_selection)" + else + enable_macro=no + fi + elif test "$enable_macro" = "no" -a "$module_selection" = "reallyall" -a \ + "$force_macro" != "no" ; then + enable_macro=$module_default + _apmod_extra_msg=" ($module_selection)" + fi + if test "$enable_macro" != "no"; then + : + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_macro$_apmod_extra_msg" >&5 +$as_echo "$enable_macro$_apmod_extra_msg" >&6; } + if test "$enable_macro" != "no"; then + case "$enable_macro" in + static*) + MODLIST="$MODLIST macro" + if test "macro" = "so"; then + sharedobjs=yes + fi + shared="";; + *) + enable_macro=`echo $enable_macro|sed 's/shared,*//'` + sharedobjs=yes + shared=yes + DSO_MODULES="$DSO_MODULES macro" + if test "most" = "yes" ; then + ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},macro" + fi + ;; + esac + + + if test -z ""; then + objects="mod_macro.lo" + else + objects="" + fi + + if test -z "$module_standalone"; then + if test -z "$shared"; then + # The filename of a convenience library must have a "lib" prefix: + libname="libmod_macro.la" + BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname" + modpath_static="$modpath_static $libname" + cat >>$modpath_current/modules.mk<>$modpath_current/modules.mk<&5 @@ -21099,6 +21381,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 @@ -21112,6 +21395,7 @@ 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 @@ -22059,6 +22343,161 @@ EOF + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_proxy_wstunnel" >&5 +$as_echo_n "checking whether to enable mod_proxy_wstunnel... " >&6; } + # Check whether --enable-proxy-wstunnel was given. +if test "${enable_proxy_wstunnel+set}" = set; then : + enableval=$enable_proxy_wstunnel; force_proxy_wstunnel=$enableval +else + enable_proxy_wstunnel=$proxy_mods_enable +fi + + _apmod_extra_msg="" + case "$enable_proxy_wstunnel" in + yes|static|shared) + _apmod_required="yes" + ;; + *) + case "$module_selection" in + reallyall|all|most) + _apmod_required="no" + ;; + *) + _apmod_required="yes" + ;; + esac + esac + if test "$enable_proxy_wstunnel" = "static"; then + enable_proxy_wstunnel=static + elif test "$enable_proxy_wstunnel" = "yes"; then + enable_proxy_wstunnel=$module_default + elif test "$enable_proxy_wstunnel" = "most"; then + if test "$module_selection" = "most" -o "$module_selection" = "all" -o \ + "$module_selection" = "reallyall" + then + enable_proxy_wstunnel=$module_default + elif test "$module_selection" = "few" -o "$module_selection" = "none"; then + enable_proxy_wstunnel=no + fi + _apmod_extra_msg=" ($module_selection)" + elif test "$enable_proxy_wstunnel" = "maybe-all"; then + if test "$module_selection" = "all" -o "$module_selection" = "reallyall" + then + enable_proxy_wstunnel=$module_default + _apmod_extra_msg=" ($module_selection)" + else + enable_proxy_wstunnel=no + fi + elif test "$enable_proxy_wstunnel" = "no" -a "$module_selection" = "reallyall" -a \ + "$force_proxy_wstunnel" != "no" ; then + enable_proxy_wstunnel=$module_default + _apmod_extra_msg=" ($module_selection)" + fi + if test "$enable_proxy_wstunnel" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: checking dependencies" >&5 +$as_echo "checking dependencies" >&6; } + if test "$enable_proxy" = "no" ; then + enable_proxy_wstunnel=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"mod_proxy is disabled but required for mod_proxy_wstunnel\"" >&5 +$as_echo "$as_me: WARNING: \"mod_proxy is disabled but required for mod_proxy_wstunnel\"" >&2;} + elif test "$enable_proxy_wstunnel" = "static" && test "$enable_proxy" != "static" ; then + enable_proxy_wstunnel=no + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"cannot build mod_proxy_wstunnel statically if mod_proxy is built shared\"" >&5 +$as_echo "$as_me: WARNING: \"cannot build mod_proxy_wstunnel statically if mod_proxy is built shared\"" >&2;} + else + : + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable mod_proxy_wstunnel" >&5 +$as_echo_n "checking whether to enable mod_proxy_wstunnel... " >&6; } + if test "$enable_proxy_wstunnel" = "no"; then + if test "$_apmod_required" = "no"; then + _apmod_extra_msg=" (disabled)" + else + as_fn_error $? "mod_proxy_wstunnel has been requested but can not be built due to prerequisite failures" "$LINENO" 5 + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_proxy_wstunnel$_apmod_extra_msg" >&5 +$as_echo "$enable_proxy_wstunnel$_apmod_extra_msg" >&6; } + if test "$enable_proxy_wstunnel" != "no"; then + case "$enable_proxy_wstunnel" in + static*) + MODLIST="$MODLIST proxy_wstunnel" + if test "proxy_wstunnel" = "so"; then + sharedobjs=yes + fi + shared="";; + *) + enable_proxy_wstunnel=`echo $enable_proxy_wstunnel|sed 's/shared,*//'` + sharedobjs=yes + shared=yes + DSO_MODULES="$DSO_MODULES proxy_wstunnel" + if test "$proxy_mods_enable" = "yes" ; then + ENABLED_DSO_MODULES="${ENABLED_DSO_MODULES},proxy_wstunnel" + fi + ;; + esac + + + if test -z "$proxy_wstunnel_objs"; then + objects="mod_proxy_wstunnel.lo" + else + objects="$proxy_wstunnel_objs" + fi + + if test -z "$module_standalone"; then + if test -z "$shared"; then + # The filename of a convenience library must have a "lib" prefix: + libname="libmod_proxy_wstunnel.la" + BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname" + modpath_static="$modpath_static $libname" + cat >>$modpath_current/modules.mk<>$modpath_current/modules.mk<-öznitelikleri\fR ] [ -\fBX\fR \fIvekil\fR[:\fIport\fR] ] [ -\fBy\fR \fI-öznitelikleri\fR ] [ -\fBz\fR \fI-ö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 ] [ -\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 - + + + + + + + + + @@ -482,7 +493,7 @@ listfunction ::= listfuncname "(" word ")" # Only allow access to this content during business hours <Directory "/foo/bar/business"> - Require expr %{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17 + Require expr "%{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17" </Directory> diff --git a/docs/manual/expr.html.fr b/docs/manual/expr.html.fr index a62b6b46..a116fa21 100644 --- a/docs/manual/expr.html.fr +++ b/docs/manual/expr.html.fr @@ -48,7 +48,7 @@
  • Autres
  • Comparaison avec SSLRequire
  • Historique de version
  • -

    Voir aussi

    +

    Voir aussi

    top

    Syntaxe en Forme de Backus-Naur

    @@ -454,6 +454,17 @@ listfunction ::= listfuncname "(" word ")"
    + + + + + + + + @@ -510,7 +521,7 @@ listfunction ::= listfuncname "(" word ")" # 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 + Require expr "%{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17" </Directory> diff --git a/docs/manual/howto/auth.html.tr.utf8 b/docs/manual/howto/auth.html.tr.utf8 index 39b8a488..dfff9350 100644 --- a/docs/manual/howto/auth.html.tr.utf8 +++ b/docs/manual/howto/auth.html.tr.utf8 @@ -5,7 +5,7 @@ This file is generated from xml source: DO NOT EDIT XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --> -Kimlik Doğrulama, Yetkilendirme ve Erişim Denetimi - Apache HTTP Sunucusu +Kimlik Doğrulama ve Yetkilendirme - Apache HTTP Sunucusu @@ -19,7 +19,7 @@
    <-

    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  | @@ -27,7 +27,6 @@  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 @@ -140,9 +139,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.

    @@ -214,14 +212,15 @@ veya httpd.conf içindeki <Directory /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 @@ -271,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.

    @@ -315,18 +315,20 @@ (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 @@ -336,19 +338,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
    @@ -382,19 +378,18 @@ 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.

    @@ -410,18 +405,17 @@ ö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 @@ -436,20 +430,19 @@ 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ı @@ -515,16 +508,14 @@ ç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 @@ -534,51 +525,45 @@ 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.

    diff --git a/docs/manual/howto/htaccess.html.en b/docs/manual/howto/htaccess.html.en index d27959bb..4bea3ad2 100644 --- a/docs/manual/howto/htaccess.html.en +++ b/docs/manual/howto/htaccess.html.en @@ -259,7 +259,7 @@ changes on a per-directory basis.

    As discussed in the documentation on Configuration Sections, .htaccess files can override the <Directory> sections for - the corresponding directory, but will be overriden by other types + the corresponding directory, but will be overridden by other types of configuration sections from the main configuration files. This fact can be used to enforce certain configurations, even in the presence of a liberal AllowOverride setting. For example, to diff --git a/docs/manual/howto/public_html.html.tr.utf8 b/docs/manual/howto/public_html.html.tr.utf8 index fd047dc1..8b502791 100644 --- a/docs/manual/howto/public_html.html.tr.utf8 +++ b/docs/manual/howto/public_html.html.tr.utf8 @@ -27,7 +27,6 @@  ko  |  tr 

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

    Çok kullanıcılı sistemlerde, UserDir yönergesi ile her kullanıcının kendi ev dizininde bir sitesi olması sağlanabilir. @@ -74,9 +73,8 @@ kullanıcının ev dizinine göreli bir dizin belirtildiği varsayılır. Yapılandırmada şöyle bir satır varsa:

    -

    - UserDir public_html -

    +
    UserDir public_html
    +

    http://example.com/~orhan/dosya.html adresine karşılık gelen dosya yolu /home/orhan/public_html/dosya.html olarak @@ -87,9 +85,8 @@ dizinlerde bulunacağı varsayılır. Yapılandırmada şöyle bir satır varsa:

    -

    - UserDir /var/html -

    +
    UserDir /var/html
    +

    http://example.com/~orhan/dosya.html adresine karşılık gelen dosya yolu /var/html/orhan/dosya.html olarak @@ -99,19 +96,17 @@ yerine kullanıcı ismi yerleştirilerek elde edilen dosya yolu kullanılır. Yapılandırmada şöyle bir satır varsa:

    -

    - UserDir /var/siteler/*/sayfam -

    +
    UserDir /var/html/*/sayfam
    +

    http://example.com/~orhan/dosya.html adresine karşılık - gelen dosya yolu /var/siteler/orhan/sayfam/dosya.html + gelen dosya yolu /var/html/orhan/sayfam/dosya.html olarak çözümlenir.

    Çok sayıda dizin veya dizin yolu belirtmek de mümkündür.

    -

    - UserDir public_html /var/siteler -

    +
    UserDir public_html /var/html
    +

    http://example.com/~orhan/dosya.html adresini Apache önce /home/orhan/public_html/dosya.html olarak arayacak, @@ -126,9 +121,8 @@ kullanıcı dizini isteklerini harici adreslere yönlendirmek için de kullanılabilir.

    -

    - UserDir http://example.org/users/*/ -

    +
    UserDir http://example.org/users/*/
    +

    Bu yapılandırmaya göre http://example.com/~bob/abc.html için yapılan bir istek http://example.org/users/bob/abc.html @@ -142,9 +136,8 @@ açıklamasında belirtilen sözdizimini kullanarak bu işlevselliği bazı kullanıcılara yasaklayabilirsiniz:

    -

    - UserDir disabled root ahmet mustafa -

    +
    UserDir disabled root ahmet veli
    +

    Bu yapılandırma ile disabled deyiminin bulunduğu satırdaki kullanıcılar dışında kalan bütün kullanıcılar için bu özellik @@ -152,10 +145,11 @@ işlevselliğin belli kullanıcılar dışında kullanılmamasını da sağlayabilirsiniz:

    -

    +

           UserDir disabled
    UserDir enabled orhan yasar -

    + +

    Daha fazla örnek için UserDir yönergesinin açıklamasına bakabilirsiniz.

    @@ -169,12 +163,13 @@ ile kullanıcının ev dizinindeki belli bir dizini CGI-etkin duruma getirebilirsiniz.

    -

    - <Directory /home/*/public_html/cgi-bin/>
    - Options ExecCGI
    - SetHandler cgi-script
    - </Directory> -

    +
    +<Directory /home/*/public_html/cgi-bin/>
    +    Options ExecCGI
    +    SetHandler cgi-script
    +</Directory>
    +    
    +

    UserDir yönergesinde public_html belirtildiği varsayımıyla diff --git a/docs/manual/install.html.en b/docs/manual/install.html.en index 768b8997..a65a41f9 100644 --- a/docs/manual/install.html.en +++ b/docs/manual/install.html.en @@ -34,7 +34,8 @@

    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 @@ -134,7 +135,7 @@ versions, download the latest versions of both APR and APR-Util from Apache APR, unpack them into ./srclib/apr and ./srclib/apr-util - (be sure the domain names do not have version numbers; for example, + (be sure the directory names do not have version numbers; for example, the APR distribution must be under ./srclib/apr/) and use ./configure's --with-included-apr option. On some platforms, you may have to install the diff --git a/docs/manual/install.html.fr b/docs/manual/install.html.fr index 61bfbcc5..db0828ec 100644 --- a/docs/manual/install.html.fr +++ b/docs/manual/install.html.fr @@ -35,7 +35,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 diff --git a/docs/manual/install.html.tr.utf8 b/docs/manual/install.html.tr.utf8 index ee83c4f4..341563c6 100644 --- a/docs/manual/install.html.tr.utf8 +++ b/docs/manual/install.html.tr.utf8 @@ -29,6 +29,7 @@  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 diff --git a/docs/manual/logs.html.en b/docs/manual/logs.html.en index 1c3a2f18..1d7bda0b 100644 --- a/docs/manual/logs.html.en +++ b/docs/manual/logs.html.en @@ -473,7 +473,7 @@ 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.

    diff --git a/docs/manual/logs.html.tr.utf8 b/docs/manual/logs.html.tr.utf8 index 780ab91d..17690ce7 100644 --- a/docs/manual/logs.html.tr.utf8 +++ b/docs/manual/logs.html.tr.utf8 @@ -27,6 +27,7 @@  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 diff --git a/docs/manual/misc/perf-tuning.html.tr.utf8 b/docs/manual/misc/perf-tuning.html.tr.utf8 index 4d1d7ab0..537c486f 100644 --- a/docs/manual/misc/perf-tuning.html.tr.utf8 +++ b/docs/manual/misc/perf-tuning.html.tr.utf8 @@ -26,7 +26,6 @@  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 @@ -143,14 +142,13 @@ .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ı @@ -169,14 +167,13 @@ 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
    @@ -186,20 +183,17 @@ 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. @@ -222,14 +216,13 @@ 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 @@ -249,16 +242,16 @@ 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 @@ -440,6 +433,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ı @@ -579,39 +578,30 @@ 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 @@ -648,41 +638,32 @@ 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 @@ -782,42 +763,32 @@ 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 diff --git a/docs/manual/misc/security_tips.html.en b/docs/manual/misc/security_tips.html.en index 72d2c562..647e5647 100644 --- a/docs/manual/misc/security_tips.html.en +++ b/docs/manual/misc/security_tips.html.en @@ -368,8 +368,7 @@

     <Directory />
    -    Order Deny,Allow
    -    Deny from all
    +    Require all denied
     </Directory>
         
    @@ -380,12 +379,10 @@
     <Directory /usr/users/*/public_html>
    -    Order Deny,Allow
    -    Allow from all
    +    Require all granted
     </Directory>
     <Directory /usr/local/httpd>
    -    Order Deny,Allow
    -    Allow from all
    +    Require all granted
     </Directory>
         
    @@ -446,8 +443,7 @@
     <Files ".ht*">
    -    Order allow,deny
    -    Deny from all
    +    Require all denied
     </Files>
         
    diff --git a/docs/manual/misc/security_tips.html.fr b/docs/manual/misc/security_tips.html.fr index e759dc46..ed41d93c 100644 --- a/docs/manual/misc/security_tips.html.fr +++ b/docs/manual/misc/security_tips.html.fr @@ -379,8 +379,7 @@
     <Directory />
    -    Order Deny,Allow
    -    Deny from all
    +    Require all denied
     </Directory>
         
    @@ -392,12 +391,10 @@
     <Directory /usr/users/*/public_html>
    -    Order Deny,Allow
    -    Allow from all
    +    Require all granted
     </Directory>
     <Directory /usr/local/httpd>
    -    Order Deny,Allow
    -    Allow from all
    +    Require all granted
     </Directory>
         
    @@ -464,8 +461,7 @@
     <Files ".ht*">
    -    Order allow,deny
    -    Deny from all
    +    Require all denied
     </Files>
         
    diff --git a/docs/manual/misc/security_tips.html.tr.utf8 b/docs/manual/misc/security_tips.html.tr.utf8 index 1a81d522..798278d1 100644 --- a/docs/manual/misc/security_tips.html.tr.utf8 +++ b/docs/manual/misc/security_tips.html.tr.utf8 @@ -331,13 +331,12 @@

    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ş @@ -365,33 +364,29 @@ 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 />
    +    Order Deny,Allow
    +    Deny 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:

    -

    - <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>
    +    Order Deny,Allow
    +    Allow from all
    +</Directory>
    +<Directory /usr/local/httpd>
    +    Order Deny,Allow
    +    Allow from all
    +</Directory>
    +    
    +

    Location ve Directory yönergelerinin etkileşimine de özellikle önem vermelisiniz; örneğin <Directory /> @@ -404,9 +399,8 @@ durumla karşılaşırız. Sunucu yapılandırma dosyanızda aşağıdaki satırın mutlaka bulunmasını öneririz:

    -

    - UserDir disabled root -

    +
    UserDir disabled root
    +
    top
    @@ -445,14 +439,14 @@

    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*">
    +    Order allow,deny
    +    Deny from all
    +</Files>
    +    
    + +
    top

    Yapılandırma bölümlerinin birleştirilmesi

    diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en index 880a4042..f3941375 100644 --- a/docs/manual/mod/core.html.en +++ b/docs/manual/mod/core.html.en @@ -689,7 +689,7 @@ headers
  • 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

    + will be relative to ServerRoot.

    Example

    diff --git a/docs/manual/mod/core.html.tr.utf8 b/docs/manual/mod/core.html.tr.utf8
    index a10a63fc..4a6675b2 100644
    --- a/docs/manual/mod/core.html.tr.utf8
    +++ b/docs/manual/mod/core.html.tr.utf8
    @@ -31,7 +31,6 @@
      ja  |
      tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    -öznitelikleri\fR ] [ -\fBZ\fR \fIşifre-kümesi\fR ] [http[s]://]\fIkonakadı\fR[:\fIport\fR]/\fIdizin\fR .SH "ÖZET" @@ -94,8 +94,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\&. .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)\&. diff --git a/docs/man/tr/apachectl.8 b/docs/man/tr/apachectl.8 index 7fc67f53..9553bc08 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 "2012-04-02" "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.1 b/docs/man/tr/apxs.1 index dce291bc..36eb6126 100644 --- a/docs/man/tr/apxs.1 +++ b/docs/man/tr/apxs.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "APXS" 1 "2012-04-02" "Apache HTTP Sunucusu" "apxs" +.TH "APXS" 1 "2013-04-17" "Apache HTTP Sunucusu" "apxs" .nh .SH İSİM apxs \- Apache Eklenti Aracı diff --git a/docs/man/tr/dbmmanage.1 b/docs/man/tr/dbmmanage.1 index f745a6dc..4e4b17cf 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 "2012-04-02" "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 index 2f0098b9..bba0ef8c 100644 --- a/docs/man/tr/fcgistarter.8 +++ b/docs/man/tr/fcgistarter.8 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "FCGİSTARTER" 8 "2012-04-02" "Apache HTTP Sunucusu" "fcgistarter" +.TH "FCGİSTARTER" 8 "2013-04-17" "Apache HTTP Sunucusu" "fcgistarter" .nh .SH İSİM fcgistarter \- Bir FastCGI programını çalıştır diff --git a/docs/man/tr/htcacheclean.8 b/docs/man/tr/htcacheclean.8 index 1bb8226a..010dca20 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 "2012-04-02" "Apache HTTP Sunucusu" "htcacheclean" +.TH "HTCACHECLEAN" 8 "2013-04-17" "Apache HTTP Sunucusu" "htcacheclean" .nh .SH İSİM htcacheclean \- Disk arabelleğini temizler diff --git a/docs/man/tr/htdbm.1 b/docs/man/tr/htdbm.1 index 289fa1ab..ddd216be 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 "2012-04-02" "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 8264dde1..5fecb4e7 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 "2012-04-02" "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 9ca51df7..cac7f1cf 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 "2012-04-03" "Apache HTTP Sunucusu" "htpasswd" +.TH "HTPASSWD" 1 "2013-04-17" "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 ] \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 ] \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\&. +.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\&. @@ -70,11 +73,17 @@ Sonuçları veritabanında güncellemek yerine standart çıktıya gönderir\&. \fB-m\fR Parolalar için MD5 şifrelemesi kullanılır\&. 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\&. \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\&. 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\&. 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\&. \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\&. @@ -142,6 +151,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 9cb9964d..8f9c775b 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 "2012-04-02" "Apache HTTP Sunucusu" "httpd" +.TH "HTTPD" 8 "2013-04-17" "Apache HTTP Sunucusu" "httpd" .nh .SH İSİM httpd \- Apache Hiper Metin Aktarım Protokolü Sunucusu diff --git a/docs/man/tr/httxt2dbm.1 b/docs/man/tr/httxt2dbm.1 index 9ee2c5b0..b5d98144 100644 --- a/docs/man/tr/httxt2dbm.1 +++ b/docs/man/tr/httxt2dbm.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "HTTXT2DBM" 1 "2012-04-02" "Apache HTTP Sunucusu" "httxt2dbm" +.TH "HTTXT2DBM" 1 "2013-04-17" "Apache HTTP Sunucusu" "httxt2dbm" .nh .SH İSİM httxt2dbm \- RewriteMap ile kullanmak için DBM dosyaları üretir @@ -35,6 +35,9 @@ httxt2dbm \- RewriteMap ile kullanmak için DBM dosyaları üretir .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" diff --git a/docs/man/tr/logresolve.1 b/docs/man/tr/logresolve.1 index 7da33e26..7ec05a49 100644 --- a/docs/man/tr/logresolve.1 +++ b/docs/man/tr/logresolve.1 @@ -19,7 +19,7 @@ .el .ne 3 .IP "\\$1" \\$2 .. -.TH "LOGRESOLVE" 1 "2012-04-02" "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 d23bb8a5..c89e4023 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 "2012-04-03" "Apache HTTP Sunucusu" "rotatelogs" +.TH "ROTATELOGS" 8 "2013-04-17" "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ı diff --git a/docs/man/tr/suexec.8 b/docs/man/tr/suexec.8 index 59d370f8..d1cd1d00 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-04-17" "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/2.4/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/configuring.html.en b/docs/manual/configuring.html.en index 454ca2f0..4221c04f 100644 --- a/docs/manual/configuring.html.en +++ b/docs/manual/configuring.html.en @@ -69,6 +69,9 @@ 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 diff --git a/docs/manual/configuring.html.fr b/docs/manual/configuring.html.fr index 06bac597..55c911d2 100644 --- a/docs/manual/configuring.html.fr +++ b/docs/manual/configuring.html.fr @@ -74,6 +74,10 @@ 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 diff --git a/docs/manual/configuring.html.tr.utf8 b/docs/manual/configuring.html.tr.utf8 index 248a5ac5..1b1b54ea 100644 --- a/docs/manual/configuring.html.tr.utf8 +++ b/docs/manual/configuring.html.tr.utf8 @@ -28,6 +28,7 @@  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.

    diff --git a/docs/manual/content-negotiation.html.en b/docs/manual/content-negotiation.html.en index 68d072dd..078ab63b 100644 --- a/docs/manual/content-negotiation.html.en +++ b/docs/manual/content-negotiation.html.en @@ -88,7 +88,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 diff --git a/docs/manual/convenience.map b/docs/manual/convenience.map index edef97c1..bc601e9e 100644 --- a/docs/manual/convenience.map +++ b/docs/manual/convenience.map @@ -106,7 +106,9 @@ authzdbmtype mod/mod_authz_dbm.html#authzdbmtype authzprovideralias mod/mod_authz_core.html#authzprovideralias authzsendforbiddenonfailure mod/mod_authz_core.html#authzsendforbiddenonfailure balancergrowth mod/mod_proxy.html#balancergrowth +balancerinherit mod/mod_proxy.html#balancerinherit balancermember mod/mod_proxy.html#balancermember +balancerpersist mod/mod_proxy.html#balancerpersist browsermatch mod/mod_setenvif.html#browsermatch browsermatchnocase mod/mod_setenvif.html#browsermatchnocase bufferedlogs mod/mod_log_config.html#bufferedlogs @@ -138,6 +140,12 @@ cachequickhandler mod/mod_cache.html#cachequickhandler cachereadsize mod/mod_cache_disk.html#cachereadsize cachereadtime mod/mod_cache_disk.html#cachereadtime cacheroot mod/mod_cache_disk.html#cacheroot +cachesocache mod/mod_cache_socache.html#cachesocache +cachesocachemaxsize mod/mod_cache_socache.html#cachesocachemaxsize +cachesocachemaxtime mod/mod_cache_socache.html#cachesocachemaxtime +cachesocachemintime mod/mod_cache_socache.html#cachesocachemintime +cachesocachereadsize mod/mod_cache_socache.html#cachesocachereadsize +cachesocachereadtime mod/mod_cache_socache.html#cachesocachereadtime cachestaleonerror mod/mod_cache.html#cachestaleonerror cachestoreexpired mod/mod_cache.html#cachestoreexpired cachestorenostore mod/mod_cache.html#cachestorenostore @@ -294,6 +302,7 @@ logformat mod/mod_log_config.html#logformat loglevel mod/core.html#loglevel logmessage mod/mod_log_debug.html#logmessage luaauthzprovider mod/mod_lua.html#luaauthzprovider +luacodecache mod/mod_lua.html#luacodecache luahookaccesschecker mod/mod_lua.html#luahookaccesschecker luahookauthchecker mod/mod_lua.html#luahookauthchecker luahookcheckuserid mod/mod_lua.html#luahookcheckuserid @@ -303,11 +312,15 @@ luahookmaptostorage mod/mod_lua.html#luahookmaptostorage luahooktranslatename mod/mod_lua.html#luahooktranslatename luahooktypechecker mod/mod_lua.html#luahooktypechecker luainherit mod/mod_lua.html#luainherit +luainputfilter mod/mod_lua.html#luainputfilter +luamaphandler mod/mod_lua.html#luamaphandler +luaoutputfilter mod/mod_lua.html#luaoutputfilter luapackagecpath mod/mod_lua.html#luapackagecpath luapackagepath mod/mod_lua.html#luapackagepath luaquickhandler mod/mod_lua.html#luaquickhandler luaroot mod/mod_lua.html#luaroot luascope mod/mod_lua.html#luascope +macro mod/mod_macro.html#macro maxconnectionsperchild mod/mpm_common.html#maxconnectionsperchild maxkeepaliverequests mod/core.html#maxkeepaliverequests maxmemfree mod/mpm_common.html#maxmemfree @@ -369,6 +382,7 @@ proxyiobuffersize mod/mod_proxy.html#proxyiobuffersize proxymatch mod/mod_proxy.html#proxymatch proxymaxforwards mod/mod_proxy.html#proxymaxforwards proxypass mod/mod_proxy.html#proxypass +proxypassinherit mod/mod_proxy.html#proxypassinherit proxypassinterpolateenv mod/mod_proxy.html#proxypassinterpolateenv proxypassmatch mod/mod_proxy.html#proxypassmatch proxypassreverse mod/mod_proxy.html#proxypassreverse @@ -511,6 +525,7 @@ sslproxycarevocationfile mod/mod_ssl.html#sslproxycarevocationfile sslproxycarevocationpath mod/mod_ssl.html#sslproxycarevocationpath sslproxycheckpeercn mod/mod_ssl.html#sslproxycheckpeercn sslproxycheckpeerexpire mod/mod_ssl.html#sslproxycheckpeerexpire +sslproxycheckpeername mod/mod_ssl.html#sslproxycheckpeername sslproxyciphersuite mod/mod_ssl.html#sslproxyciphersuite sslproxyengine mod/mod_ssl.html#sslproxyengine sslproxymachinecertificatechainfile mod/mod_ssl.html#sslproxymachinecertificatechainfile @@ -555,7 +570,9 @@ traceenable mod/core.html#traceenable transferlog mod/mod_log_config.html#transferlog typesconfig mod/mod_mime.html#typesconfig undefine mod/core.html#undefine +undefmacro mod/mod_macro.html#undefmacro unsetenv mod/mod_env.html#unsetenv +use mod/mod_macro.html#use usecanonicalname mod/core.html#usecanonicalname usecanonicalphysicalport mod/core.html#usecanonicalphysicalport user mod/mod_unixd.html#user diff --git a/docs/manual/developer/modguide.html.en b/docs/manual/developer/modguide.html.en index 5e44f7e6..5f3ed86a 100644 --- a/docs/manual/developer/modguide.html.en +++ b/docs/manual/developer/modguide.html.en @@ -55,7 +55,7 @@ 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 -write out its own configuration to the client. +writes out its own configuration to the client.

    @@ -314,11 +314,11 @@ looks like

    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_req* structure passed along with every call that is made. -This struct, typically just refered to as r in modules, +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_req structure are: +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
    • @@ -333,7 +333,7 @@ request_req structure are: "Memory management" chapter.

    -A complete list of all the values contained with in the request_req structure can be found in +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.

    @@ -428,7 +428,7 @@ the next, without informing other handlers.
    • - ap_rputs(const char *string, request_req *r):
      + ap_rputs(const char *string, request_rec *r):
      Sends a string of text to the client. This is a shorthand version of ap_rwrite. @@ -454,7 +454,7 @@ the next, without informing other handlers.
    • - ap_set_content_type(request_req *r, const char *type):
      + ap_set_content_type(request_rec *r, const char *type):
      Sets the content type of the output you are sending. @@ -728,7 +728,7 @@ static int example_handler(request_rec *r)

      -This version in its entirity can be found here: +This version in its entirety can be found here: mod_example_2.c.

      @@ -917,7 +917,7 @@ set them.)

      The directive handler function

      -Now that we've told the server to expect some directives for our module, it's +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 @@ -927,7 +927,7 @@ has an additional parameter defined:

      -/* Handler for the "exambleEnabled" directive */
      +/* 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;
      @@ -998,7 +998,7 @@ static example_config config;
        Our directive handlers:
        ==============================================================================
        */
      -/* Handler for the "exambleEnabled" directive */
      +/* 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;
      @@ -1217,8 +1217,19 @@ AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or
       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.
      +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

      @@ -1279,12 +1290,12 @@ void* example_create_dir_conf(apr_pool_t* pool, char* context) {

      Merging configurations

      Our next step in creating a context aware configuration is merging -configurations. This part of the process particularly apply to scenarios +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">
      -    ExampleEnable On
      +    ExampleEnabled On
           ExamplePath /foo/bar
           ExampleAction file allow
       </Directory>
      @@ -1295,8 +1306,8 @@ where you have a parent configuration and a child, such as the following:
       
       

      In this example, it is natural to assume that the directory -/var/www/subdir should inherit the value set for the /var/www - directory, as we did not specify a ExampleEnable nor +/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:

      @@ -1478,7 +1489,7 @@ static int example_handler(request_rec *r) /* ======================================================================================================================= - Handler for the "exambleEnabled" directive + Handler for the "exampleEnabled" directive ======================================================================================================================= */ const char *example_set_enabled(cmd_parms *cmd, void *cfg, const char *arg) @@ -1625,7 +1636,7 @@ typedef struct { const char* value; } keyValuePair; -keyValuePair* readPost(request_req* r) { +keyValuePair* readPost(request_rec* r) { apr_array_header_t *pairs = NULL; apr_off_t len; apr_size_t size; @@ -1651,14 +1662,14 @@ keyValuePair* readPost(request_req* r) { return kvp; } -static int example_handler(request_req *r) +static int example_handler(request_rec *r) { /*~~~~~~~~~~~~~~~~~~~~~~*/ keyValuePair* formData; /*~~~~~~~~~~~~~~~~~~~~~~*/ - formData = readPost(); + formData = readPost(r); if (formData) { int i; for (i = 0; formData[i]; i++) { @@ -1679,7 +1690,7 @@ static int example_handler(request_req *r)
      -static int example_handler(request_req *r) 
      +static int example_handler(request_rec *r) 
       {
           /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
           const apr_array_header_t    *fields;
      @@ -1741,7 +1752,7 @@ static int util_read(request_rec *r, const char **rbuf, apr_off_t *size)
           return(rc);
       }
       
      -static int example_handler(request_req* r) 
      +static int example_handler(request_rec* r) 
       {
           /*~~~~~~~~~~~~~~~~*/
           apr_off_t   size;
      diff --git a/docs/manual/developer/modules.html.en b/docs/manual/developer/modules.html.en
      index 5feb8af6..a600d5b6 100644
      --- a/docs/manual/developer/modules.html.en
      +++ b/docs/manual/developer/modules.html.en
      @@ -121,7 +121,7 @@ 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.

      diff --git a/docs/manual/developer/new_api_2_4.html.en b/docs/manual/developer/new_api_2_4.html.en index 137bdbd5..ba10c06e 100644 --- a/docs/manual/developer/new_api_2_4.html.en +++ b/docs/manual/developer/new_api_2_4.html.en @@ -493,6 +493,10 @@
      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 diff --git a/docs/manual/expr.html.en b/docs/manual/expr.html.en index e1eaa0c3..5c3ae459 100644 --- a/docs/manual/expr.html.en +++ b/docs/manual/expr.html.en @@ -46,7 +46,7 @@
    • Other
    • Comparison with SSLRequire
    • Version History
    • -

    See also

    +

    See also

    top

    Grammar in Backus-Naur Form notation

    @@ -428,12 +428,23 @@ listfunction ::= listfuncname "(" word ")"
    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
    file Read contents from a fileyes
    filesize "Dschappe" les chanes codes en hexadcimal, en ne gardant encods que les slashes; renvoie la chane vide si la squence %00 est rencontre
    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
    file Lit le contenu d'un fichieroui
    filesize
    Açıklama:Apache HTTP Sunucusunda daima mevcut olan çekirdek özellikler
    Durum:Çekirdek
    @@ -130,7 +129,7 @@ Uyumluluk:Windows'ta Apache httpd 2.3.3 ve sonrasında diğerlerinde Apache httpd 2.1.5 ve sonrasında mevcuttur. -

    Bu yönerge Protocol yönergesinde belirtilen +

    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ı @@ -144,7 +143,10 @@ httpd 2.1.5 ve sonrasında mevcuttur. 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 @@ -152,10 +154,11 @@ httpd 2.1.5 ve sonrasında mevcuttur. 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 @@ -163,10 +166,11 @@ httpd 2.1.5 ve sonrasında mevcuttur. ş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 @@ -176,10 +180,11 @@ httpd 2.1.5 ve sonrasında mevcuttur.

    Windows’taki öntanımlı değerler::

    -

    - AcceptFilter http data
    - AcceptFilter https data -

    +
    +AcceptFilter http data
    +AcceptFilter https data
    +    
    +

    Windows'un mpm_winnt modülü AcceptEx() arayüzünü açıp kapamak için AcceptFilter'i yorumlar ve @@ -201,7 +206,7 @@ httpd 2.1.5 ve sonrasında mevcuttur.

    Ayrıca bakınız:

    top
    @@ -215,7 +220,6 @@ httpd 2.1.5 ve sonrasında mevcuttur. Geçersizleştirme:FileInfo Durum:Çekirdek Modül:core -Uyumluluk:Apache httpd 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 @@ -259,15 +263,14 @@ httpd 2.1.5 ve sonrasında mevcuttur. 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>
    +    
    + @@ -285,20 +288,18 @@ httpd 2.1.5 ve sonrasında mevcuttur. 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, @@ -338,9 +339,8 @@ httpd 2.1.5 ve sonrasında mevcuttur. 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 @@ -370,8 +370,8 @@ httpd 2.1.5 ve sonrasında mevcuttur. Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core -Uyumluluk:Apache httpd 2.0.46 ve sonrasında mevcuttur. NoDecode seçeneği - Apache httpd 2.3.12 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 @@ -479,6 +479,11 @@ httpd 2.1.5 ve sonrasında mevcuttur. 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. @@ -554,14 +559,17 @@ httpd 2.1.5 ve sonrasında mevcuttur. 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.

    @@ -608,10 +616,11 @@ httpd 2.1.5 ve sonrasında mevcuttur.

    Örnek:

    -

    - AllowOverride None
    - AllowOverrideList Redirect RedirectMatch -

    +
    +AllowOverride None
    +AllowOverrideList Redirect RedirectMatch
    +    
    +

    Yukarıdaki örnekte sadece Redirect ve RedirectMatch yönergelerine izin verilmektedir. Tüm @@ -619,10 +628,11 @@ httpd 2.1.5 ve sonrasında mevcuttur.

    Örnek:

    -

    - AllowOverride AuthConfig
    - AllowOverrideList CookieTracking CookieName -

    +
    +AllowOverride AuthConfig
    +AllowOverrideList CookieTracking CookieName
    +    
    +

    Yukarıdaki örnekte AllowOverride yönergesi AuthConfig yönerge grubuna izin @@ -714,9 +724,11 @@ httpd 2.1.5 ve sonrasında mevcuttur. tam yol ServerRoot yönergesinde belirtilene göreli olacaktır.

    -

    Example

    - DefaultRuntimeDir scratch/ -

    +

    Örnek

    +
    +DefaultRuntimeDir scratch/
    +    
    +

    DefaultRuntimeDir için öntanımlı yer derleme sırasında DEFAULT_REL_RUNTIMEDIR #define satırı ile @@ -755,9 +767,8 @@ için iptal edilmiştir. 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.

    @@ -788,15 +799,17 @@ için iptal edilmiştir. 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>
    -

    +
    +<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 @@ -830,13 +843,12 @@ için iptal edilmiştir. 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-yolu argümanlarını belirtirken dikkatli @@ -850,9 +862,12 @@ için iptal 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.

    @@ -862,19 +877,16 @@ için iptal 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:

    @@ -896,13 +908,12 @@ için iptal 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 @@ -915,14 +926,12 @@ için iptal edilmiştir. erişime izin vermek oluşuna dikkat ediniz. Bunu şöyle bir blokla değiştirmeniz,

    -

    - <Directory />
    - - Order Deny,Allow
    - Deny from All
    -
    - </Directory> -

    +
    +<Directory />
    +  Require all denied
    +</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 @@ -956,9 +965,12 @@ için iptal edilmiştir. 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 üç rakamdan oluşan dizinlerle eşleşecektir.

    @@ -1001,9 +1013,8 @@ için iptal 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://my.example.com/index.html isteği /usr/web/index.html ile eşleştirilir. @@ -1035,14 +1046,15 @@ için iptal edilmiştir. <ElseIf> bölümü uygulanmamışsa kapsadığı yönergeleri uygular. Örneğin:

    -

    - <If "-z req('Host')">
    - ...
    - </If>
    - <Else>
    - ...
    - </Else>
    -

    +
    +<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 @@ -1079,17 +1091,18 @@ için iptal edilmiştir. <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>
    -

    +
    +<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 @@ -1148,20 +1161,18 @@ için iptal edilmiştir. 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
    @@ -1175,7 +1186,7 @@ için iptal edilmiştir. Geçersizleştirme:FileInfo Durum:Çekirdek Modül:core -Uyumluluk:2.0.44 ve sonrasında mevcuttur. Öntanımlı değer 2.3.9 sürümünde Off olarak değişti. +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 @@ -1209,21 +1220,20 @@ için iptal edilmiştir.

    Bu sorunlardan muzdarip sunucu yapılandırmaları için bu özelliği şöyle etkin kılabilirsiniz:

    -

    - EnableSendfile On -

    +
    EnableSendfile On
    +

    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 +

    +<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 @@ -1245,24 +1255,26 @@ için iptal edilmiştir. ü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>
    - Hata: mod_include mod_foo için gerekiyor. LoadModule ile yükleyin.
    - </IfModule>
    -
    - # SSL veya NOSSL tanımlı mı bilelim
    - <IfDefine SSL>
    - <IfDefine NOSSL>
    - Hata: Ne SSL ne de NOSSL tanımlı. Sadece biri tanımlı olsa yeter.
    - </IfDefine>
    - </IfDefine>
    - <IfDefine !SSL>
    - <IfDefine !NOSSL>
    - Hata: Ya SSL ya da NOSSL tanımlı olmalı.
    - </IfDefine>
    - </IfDefine>
    -

    +
    +# Ö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>
    +    
    + @@ -1285,8 +1297,8 @@ için iptal edilmiştir.
  • Özel bir ileti çıktılanır.
  • -
  • Sorunu/hatayı işleyecek yerel bir URL-yoluna yönlendirme - yapılır.
  • +
  • Sorunu/hatayı işleyecek yerel bir URL-yoluna dahili bir + yönlendirme yapılır.
  • Sorunu/hatayı işleyecek harici bir URL-yoluna yönlendirme yapılır.
  • @@ -1302,13 +1314,13 @@ için iptal edilmiştir. şeklinde de belirtilebilir. Bunlar yerine, tarayıcıda gösterilmek üzere bir ileti de belirtilebilir. Örnekler:

    -

    - ErrorDocument 500 http://hata.example.com/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 403 Yasak! -

    +
    +ErrorDocument 500 http://foo.example.com/cgi-bin/tester
    +ErrorDocument 404 /cgi-bin/bad_urls.pl
    +ErrorDocument 401 /subscription_info.html
    +ErrorDocument 403 "Kusura bakmayın, bugün hizmet veremiyoruz."
    +    
    +

    Bunlardan başka, Apache httpd’nin kendi hata iletilerinin kullanılacağı özel default değeri ile belirtilebilir. Normal şartlar @@ -1318,14 +1330,14 @@ için iptal edilmiştir. 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 @@ -1385,17 +1397,15 @@ için iptal edilmiştir. 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" -

    +
    ErrorLog "|/usr/local/bin/httpd_errors"
    +

    Daha fazla bilgi için borulu günlüklere bakınız.

    @@ -1410,9 +1420,8 @@ için iptal edilmiştir. değiştirilmişse, belirtilen en son oluşum tüm sunucuyu etkileyecektir.

    -

    Örnek

    - ErrorLog syslog:user -

    +
    ErrorLog syslog:user
    +

    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 @@ -1447,9 +1456,11 @@ için iptal edilmiştir. 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" -

    +
    +#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 @@ -1574,14 +1585,15 @@ için iptal edilmiştir. 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 ilşklendirmek için de kullanılabilmektedir. + 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.

    -

    Example (default format)

    - ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" -

    +
    +#Ö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:

    @@ -1592,18 +1604,21 @@ için iptal edilmiştir.

    Dikkat edin, yukarıda açıklandığı gibi, bazı alanlar tanımlanmadıklarından tamamen yoksayılır.

    -

    Örnek (2.2.x biçemine benzer)

    - ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] - %M% ,\ referer\ %{Referer}i" -

    +
    +#Ö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"
    +    
    -

    İ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:

    @@ -1676,7 +1691,8 @@ için iptal edilmiştir.
    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.
    @@ -1740,11 +1756,27 @@ için iptal edilmiştir.

    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> @@ -1781,9 +1813,12 @@ için iptal edilmiştir. 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.

    @@ -1817,9 +1852,8 @@ için iptal edilmiştir. .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 @@ -1828,21 +1862,19 @@ için iptal edilmiştir.

    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>
    +
    +# 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 @@ -1929,9 +1961,8 @@ 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 "-z req('Host')"> -

    +
    <If "-z req('Host')">
    +

    Bir Host: başlığı içermeyen HTTP/1.0 istekleriyle eşleşir. İfadeler, dizge karşılaştırması (=, @@ -1940,9 +1971,8 @@ takdirde uygulanacak yönergeleri barındırır. -z, -f, ...) için kabuktakilere benzer çeşitli işleçler içerebilir. Ayrıca, düzenli ifadeleri,

    -

    - <If "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/"> -

    +
    <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 @@ -2009,32 +2039,23 @@ 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
    @@ -2097,8 +2118,7 @@ yönergeleri sarmalar. 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, dizin kalıbıyla - eşleşme ise 2.3.6 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.

    @@ -2125,34 +2145,34 @@ yönergeleri sarmalar.

    Ö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 -

    +
    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 -

    +
    IncludeOptional conf/vhosts/*/*.conf
    +

    Ayrıca bakınız:

    @@ -2273,13 +2293,12 @@ 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, @@ -2311,18 +2330,15 @@ 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>
    +    
    + @@ -2347,13 +2363,12 @@ 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>
    +    
    + @@ -2367,7 +2382,6 @@ belirler. Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core -Uyumluluk:Apache httpd 2.0.47 ve sonrasında mevcuttur.

    Örneğin, özgün istekleri dahili olarak bir CGI betiğine yönlendiren Action yönergesi @@ -2389,9 +2403,8 @@ belirler. sayı belirtilirse iki sınırlama için de aynı değer kullanılır.

    -

    Örnek

    - LimitInternalRecursion 5 -

    +
    LimitInternalRecursion 5
    +
    top
    @@ -2431,9 +2444,8 @@ 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 @@ -2476,9 +2488,8 @@ sınırlar.

    Örnek:

    -

    - LimitRequestFields 50 -

    +
    LimitRequestFields 50
    +

    Uyarı

    İsme dayalı sanal konaklar kullanıldığında, bu yönergenin değeri, @@ -2516,9 +2527,8 @@ sınırlar.

    Örnek:

    -

    - LimitRequestFieldSize 4094 -

    +
    LimitRequestFieldSize 4094
    +
    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 @@ -2560,9 +2570,8 @@ sınırlar.

    Örnek:

    -

    - LimitRequestLine 4094 -

    +
    LimitRequestLine 4094
    +
    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 @@ -2592,9 +2601,8 @@ sınırlar.

    Örnek:

    -

    - LimitXMLRequestBody 0 -

    +
    LimitXMLRequestBody 0
    +
    @@ -2646,18 +2654,25 @@ sınırlar. /private1/file.txt istekleri için sarmalanan yönergeler uygulanacaktır, fakat /private1other isteğine uygulanmayacaktır.

    -

    - <Location /private1> - ... -

    + +
    +<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 /private2/>
    +    # ...
    +</Location>
    +    
    +

    <Location> ne zaman kullanılmalı

    @@ -2685,9 +2700,12 @@ 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 @@ -2700,14 +2718,13 @@ sınırlar. example.com’dan gelen isteklere izin vermek için şöyle bir uygulama yapabilirsiniz:

    -

    - <Location /status>
    - - SetHandler server-status
    - Require host example.com
    -
    - </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ı @@ -2752,9 +2769,12 @@ 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.

    @@ -2911,9 +2931,9 @@ uygulanır.

    Örnek:

    -

    - LogLevel notice -

    +
    LogLevel notice
    + +

    Ek Bilgi

    Günlük iletileri normal bir dosyaya yazılırken notice @@ -2929,26 +2949,34 @@ uygulanır. _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
    -

    +
    +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
    - </Files> -

    +
    +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şklendirilmemiş günlük + iletileri etkiler. Bağlantı veya sunucu ile ilişkilendirilmemiş günlük iletileri etkilenmez.
    +

    Ayrıca bakınız:

    +
    top

    MaxKeepAliveRequests Yönergesi

    @@ -2967,9 +2995,8 @@ uygulanır.

    Örnek:

    -

    - MaxKeepAliveRequests 500 -

    +
    MaxKeepAliveRequests 500
    +
    top
    @@ -3294,10 +3321,11 @@ uygulanır. öntanımlı mekanizması ise sysvsem ile değiştirilmektedir.

    -

    - Mutex sysvsem default
    - Mutex fcntl:/var/httpd/locks mpm-accept -

    +
    +Mutex sysvsem default
    +Mutex fcntl:/var/httpd/locks mpm-accept
    +    
    +
    top
    @@ -3352,8 +3380,9 @@ uygulanı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.

    +

    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.

    @@ -3386,11 +3415,13 @@ uygulanır.
    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.

    @@ -3410,38 +3441,32 @@ uygulanır.

    Ö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 @@ -3482,9 +3507,8 @@ uygulanır.

    Örneğin, https'i standartdışı bir portta çalıştırmak isterseniz protokolü şöyle belirtebilirsiniz:

    -

    - Protocol https -

    +
    Protocol https
    +

    Protokolü Listen yönergesini kullanarak da belirtebilirsiniz.

    @@ -3492,6 +3516,7 @@ uygulanır.

    Ayrıca bakınız:

    @@ -3620,8 +3645,7 @@ uygulanır. Geçersizleştirme:FileInfo Durum:Çekirdek Modül:core -Uyumluluk:Sadece Win32 için; Registry-Strict seçeneği Apache -HTTP Sunucusunun 2.0 ve sonraki sürümleri için geçerlidir. +Uyumluluk:Sadece Win32 için.

    Bu yönerge Apache httpd’nin CGI betiklerini çalıştıracak yorumlayıcıyı nasıl tespit edeceğini belirler. Script öntanımlı olup @@ -3630,16 +3654,14 @@ HTTP Sunucusunun 2.0 ve sonraki sürümleri için geçerlidir. 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 @@ -3734,9 +3756,8 @@ HTTP Sunucusunun 2.0 ve sonraki sürümleri için geçerlidir. burada belirtilecek adresin sırf bu işe adanmış bir adres olması daha iyidir. Örnek:

    -

    - ServerAdmin www-admin@example.com -

    +
    ServerAdmin www-admin@foo.example.com
    +
    top
    @@ -3755,23 +3776,26 @@ 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 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>
    +    
    +

    İ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:

      @@ -3804,9 +3828,8 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar. DNS rumuzu varsa ve HTTP sunucunuzun bu rumuzla kendini özdeşleştirmesini isterseniz bunu şöyle belirtebilirsiniz:

      -

      - ServerName www.example.com -

      +
      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 @@ -3897,9 +3920,8 @@ 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 @@ -3965,7 +3987,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.4.1 +
      Sunucu şunu gönderir (örnek): Server: Apache/2.4.2 (Unix) PHP/4.2.2 MyMod/1.2
      ServerTokens Prod[uctOnly]
      @@ -3982,10 +4004,10 @@ kullanılacak konak adları için başka isimler belirtebilmeyi sağlar.
      ServerTokens Min[imal]
      Sunucu şunu gönderir (örnek): Server: - Apache/2.4.1
      + Apache/2.4.2
      ServerTokens OS
      -
      Sunucu şunu gönderir (örnek): Server: Apache/2.4.1 +
      Sunucu şunu gönderir (örnek): Server: Apache/2.4.2 (Unix)
      @@ -4028,23 +4050,31 @@ 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>
      +    
      + -

      Evvelce tanımlanmış bir SetHandler yönergesini +

      Evvelce tanımlanmış bir SetHandler yönergesini None değeriyle geçersiz hale getirebilirsiniz.

      Bilgi

      @@ -4102,13 +4132,12 @@ 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 @@ -4162,8 +4191,6 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. Bağlam:sunucu geneli, sanal konak Durum:Çekirdek Modül:core -Uyumluluk:Apache HTTP Sunucusunun 1.3.34, 2.0.55 ve sonraki sürümlerinde - kuallanılabilir.

      Bu yönerge çekirdek ve vekil (mod_proxy) sunucuların her ikisi için öntanımlı TRACE davranışını değiştirir. @@ -4243,8 +4270,7 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. 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 + 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.

      @@ -4361,34 +4387,32 @@ gerçekleşmesi için sunucunun geçmesini bekleyeceği süre. dizgesi.
    -

    Örnek

    - <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>
    +    
    +

    İ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:

    -

    - <VirtualHost [2001:db8::a00:20ff:fea7:ccea]>
    - - 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>
    +    
    +

    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 diff --git a/docs/manual/mod/directives.html.de b/docs/manual/mod/directives.html.de index f3b77bcd..c8d4e349 100644 --- a/docs/manual/mod/directives.html.de +++ b/docs/manual/mod/directives.html.de @@ -82,6 +82,7 @@

  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -146,6 +147,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -179,6 +181,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -335,6 +343,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -344,12 +353,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -410,6 +423,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -552,6 +566,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -596,7 +611,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/directives.html.en b/docs/manual/mod/directives.html.en index 6fc5a72e..04b32a7b 100644 --- a/docs/manual/mod/directives.html.en +++ b/docs/manual/mod/directives.html.en @@ -83,6 +83,7 @@
  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -147,6 +148,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -180,6 +182,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -336,6 +344,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -345,12 +354,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -411,6 +424,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -553,6 +567,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -597,7 +612,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/directives.html.es b/docs/manual/mod/directives.html.es index 7d1258b1..c7f20245 100644 --- a/docs/manual/mod/directives.html.es +++ b/docs/manual/mod/directives.html.es @@ -85,6 +85,7 @@
  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -149,6 +150,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -182,6 +184,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -338,6 +346,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -347,12 +356,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -413,6 +426,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -555,6 +569,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -599,7 +614,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/directives.html.fr b/docs/manual/mod/directives.html.fr index 94c8fef1..c922eb1d 100644 --- a/docs/manual/mod/directives.html.fr +++ b/docs/manual/mod/directives.html.fr @@ -83,6 +83,7 @@
  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -147,6 +148,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -180,6 +182,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -336,6 +344,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -345,12 +354,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -411,6 +424,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -553,6 +567,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -597,7 +612,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/directives.html.ja.utf8 b/docs/manual/mod/directives.html.ja.utf8 index d235963a..05e66d57 100644 --- a/docs/manual/mod/directives.html.ja.utf8 +++ b/docs/manual/mod/directives.html.ja.utf8 @@ -80,6 +80,7 @@
  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -144,6 +145,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -177,6 +179,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -333,6 +341,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -342,12 +351,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -408,6 +421,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -550,6 +564,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -594,7 +609,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/directives.html.ko.euc-kr b/docs/manual/mod/directives.html.ko.euc-kr index 4adad0b4..2ddb0efd 100644 --- a/docs/manual/mod/directives.html.ko.euc-kr +++ b/docs/manual/mod/directives.html.ko.euc-kr @@ -80,6 +80,7 @@
  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -144,6 +145,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -177,6 +179,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -333,6 +341,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -342,12 +351,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -408,6 +421,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -550,6 +564,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -594,7 +609,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/directives.html.tr.utf8 b/docs/manual/mod/directives.html.tr.utf8 index 57093626..69da116c 100644 --- a/docs/manual/mod/directives.html.tr.utf8 +++ b/docs/manual/mod/directives.html.tr.utf8 @@ -79,6 +79,7 @@
  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -143,6 +144,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -176,6 +178,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -332,6 +340,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -341,12 +350,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -407,6 +420,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -549,6 +563,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -593,7 +608,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/directives.html.zh-cn b/docs/manual/mod/directives.html.zh-cn index 1bbd7426..9d6d18a9 100644 --- a/docs/manual/mod/directives.html.zh-cn +++ b/docs/manual/mod/directives.html.zh-cn @@ -78,6 +78,7 @@
  • Anonymous_VerifyEmail
  • AsyncRequestWorkerFactor
  • AuthBasicAuthoritative
  • +
  • AuthBasicFake
  • AuthBasicProvider
  • AuthDBDUserPWQuery
  • AuthDBDUserRealmQuery
  • @@ -142,6 +143,7 @@
  • <AuthzProviderAlias>
  • AuthzSendForbiddenOnFailure
  • BalancerGrowth
  • +
  • BalancerInherit
  • BalancerMember
  • BalancerPersist
  • BrowserMatch
  • @@ -175,6 +177,12 @@
  • CacheReadSize
  • CacheReadTime
  • CacheRoot
  • +
  • CacheSocache
  • +
  • CacheSocacheMaxSize
  • +
  • CacheSocacheMaxTime
  • +
  • CacheSocacheMinTime
  • +
  • CacheSocacheReadSize
  • +
  • CacheSocacheReadTime
  • CacheStaleOnError
  • CacheStoreExpired
  • CacheStoreNoStore
  • @@ -331,6 +339,7 @@
  • LogLevel
  • LogMessage
  • LuaAuthzProvider
  • +
  • LuaCodeCache
  • LuaHookAccessChecker
  • LuaHookAuthChecker
  • LuaHookCheckUserID
  • @@ -340,12 +349,16 @@
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • LuaRoot
  • LuaScope
  • -
  • MaxConnectionsPerChild
  • +
  • <Macro>
  • +
  • MaxConnectionsPerChild
  • MaxKeepAliveRequests
  • MaxMemFree
  • MaxRangeOverlaps
  • @@ -406,6 +419,7 @@
  • <ProxyMatch>
  • ProxyMaxForwards
  • ProxyPass
  • +
  • ProxyPassInherit
  • ProxyPassInterpolateEnv
  • ProxyPassMatch
  • ProxyPassReverse
  • @@ -548,6 +562,7 @@
  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -592,7 +607,9 @@
  • TransferLog
  • TypesConfig
  • UnDefine
  • +
  • undefMacro
  • UnsetEnv
  • +
  • Use
  • UseCanonicalName
  • UseCanonicalPhysicalPort
  • User
  • diff --git a/docs/manual/mod/index.html.de b/docs/manual/mod/index.html.de index 573a92ec..393681ad 100644 --- a/docs/manual/mod/index.html.de +++ b/docs/manual/mod/index.html.de @@ -108,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 @@ -159,7 +161,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
    This module provides usage of macros within apache 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)
    @@ -188,6 +191,8 @@ from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP 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 original client IP address for the connection diff --git a/docs/manual/mod/index.html.en b/docs/manual/mod/index.html.en index 6897d201..091ee19c 100644 --- a/docs/manual/mod/index.html.en +++ b/docs/manual/mod/index.html.en @@ -104,6 +104,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 @@ -155,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
    This module provides usage of macros within apache 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)
    @@ -184,6 +187,8 @@ from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP 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 original client IP address for the connection diff --git a/docs/manual/mod/index.html.es b/docs/manual/mod/index.html.es index aef2020b..b9040a20 100644 --- a/docs/manual/mod/index.html.es +++ b/docs/manual/mod/index.html.es @@ -109,6 +109,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 @@ -160,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
    This module provides usage of macros within apache 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)
    @@ -189,6 +192,8 @@ from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP 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 original client IP address for the connection diff --git a/docs/manual/mod/index.html.fr b/docs/manual/mod/index.html.fr index fc8b53d3..ab924fcc 100644 --- a/docs/manual/mod/index.html.fr +++ b/docs/manual/mod/index.html.fr @@ -54,13 +54,15 @@ disponibles
    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
    +
    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
    Multi-Processing Module optimized for Windows NT.
    +
    mpm_winnt
    Module multi-processus optimis pour Windows +NT.
    worker
    Module multi-processus implmentant un serveur web hybride multi-processus multi-thread
    @@ -114,6 +116,8 @@ 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_cache_socache
    Shared object cache (socache) based storage module for the +HTTP caching filter.
    mod_cern_meta
    La smantique des mtafichiers du serveur httpd du CERN
    mod_cgi
    Excution des scripts CGI
    @@ -154,12 +158,14 @@ fichiers contexte
    mod_headers
    Personnalisation des en-ttes de requtes et de rponses HTTP
    -
    mod_heartbeat
    Sends messages with server status to frontend proxy
    -
    mod_heartmonitor
    Centralized monitor for mod_heartbeat origin servers
    +
    mod_heartbeat
    Envoie des messages d'tat au mandataire frontal
    +
    mod_heartmonitor
    Moniteur centralis pour les serveurs d'origine mod_heartbeat
    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
    Extensions ISAPI au coeur d'Apache pour Windows
    @@ -176,20 +182,22 @@ fonction d'un niveau de trafic pour le module 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_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_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_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
    Active le chiffrement SSL pour Netware
    @@ -218,6 +226,8 @@ mandataire. 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.
    @@ -225,7 +235,8 @@ filtres en sortie. 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
    Filtres permettant de traiter et de mettre disposition les corps de requtes HTTP
    @@ -235,19 +246,21 @@ r
    mod_sed
    Filtre les contenus en entre (requtes) et en sortie (rponses) en utilisant la syntaxe de sed
    mod_session
    Support des sessions
    -
    mod_session_cookie
    Cookie based session support
    -
    mod_session_crypto
    Session encryption support
    -
    mod_session_dbd
    DBD/SQL based session support
    +
    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.
    +
    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_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_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 @@ -256,18 +269,20 @@ Sockets Layer (SSL) et Transport Layer Security (TLS)
    du serveur
    mod_substitute
    Effectue des oprations de recherche/remplacement sur les corps de rponses
    -
    mod_suexec
    Allows CGI scripts to run as a specified user -and Group
    +
    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_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 diff --git a/docs/manual/mod/index.html.ja.utf8 b/docs/manual/mod/index.html.ja.utf8 index 320f863b..5228d736 100644 --- a/docs/manual/mod/index.html.ja.utf8 +++ b/docs/manual/mod/index.html.ja.utf8 @@ -102,6 +102,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 スクリプトの実行
    @@ -147,7 +149,8 @@ by other LDAP modules
    mod_logio
    リクエスト毎に入力バイト数と出力バイト数とをロギング
    mod_lua
    Provides Lua hooks into various portions of the httpd request processing
    -
    mod_mime
    リクエストされたファイルの拡張子とファイルの振る舞い +
    mod_macro
    This module provides usage of macros within apache runtime configuration files
    +
    mod_mime
    リクエストされたファイルの拡張子とファイルの振る舞い (ハンドラとフィルタ)、内容 (MIME タイプ、言語、文字セット、エンコーディング) とを関連付ける
    mod_mime_magic
    Determines the MIME type of a file @@ -176,6 +179,8 @@ from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP 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 original client IP address for the connection diff --git a/docs/manual/mod/index.html.ko.euc-kr b/docs/manual/mod/index.html.ko.euc-kr index 34a82178..cd881ec7 100644 --- a/docs/manual/mod/index.html.ko.euc-kr +++ b/docs/manual/mod/index.html.ko.euc-kr @@ -100,6 +100,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 ũƮ
    @@ -145,7 +147,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
    This module provides usage of macros within apache 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)
    @@ -174,6 +177,8 @@ from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP 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 original client IP address for the connection diff --git a/docs/manual/mod/index.html.tr.utf8 b/docs/manual/mod/index.html.tr.utf8 index 27a46256..921c7671 100644 --- a/docs/manual/mod/index.html.tr.utf8 +++ b/docs/manual/mod/index.html.tr.utf8 @@ -99,6 +99,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 @@ -151,7 +153,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
    This module provides usage of macros within apache 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,6 +183,8 @@ from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP 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 original client IP address for the connection diff --git a/docs/manual/mod/index.html.zh-cn b/docs/manual/mod/index.html.zh-cn index 03089229..d48dc823 100644 --- a/docs/manual/mod/index.html.zh-cn +++ b/docs/manual/mod/index.html.zh-cn @@ -99,6 +99,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 @@ -150,7 +152,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
    This module provides usage of macros within apache 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)
    @@ -179,6 +182,8 @@ from Clients' networks in a proxy context.
    mod_proxy_http
    HTTP 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 original client IP address for the connection diff --git a/docs/manual/mod/mod_alias.html.tr.utf8 b/docs/manual/mod/mod_alias.html.tr.utf8 index 36d42bfa..f551b6d8 100644 --- a/docs/manual/mod/mod_alias.html.tr.utf8 +++ b/docs/manual/mod/mod_alias.html.tr.utf8 @@ -30,7 +30,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -99,10 +98,11 @@ 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 @@ -127,9 +127,10 @@ eşlenmesini sağlar ve URL yönlendirmesi yapar. 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://example.com/image/foo.gif şeklinde bir istek, sunucunun /ftp/pub/image/foo.gif dosyasıyla yanıt vermesine @@ -161,14 +162,16 @@ 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>
    - - Require all granted
    -
    - </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.

    top
    @@ -190,18 +193,20 @@ 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 -

    +
    +AliasMatch (?i)^/image(.*) /ftp/pub/image$1
    +    
    +

    Alias ve AliasMatch yönergeleri @@ -220,32 +225,41 @@ eşler.

    Örneğin aşağıdakini AliasMatch ile değiştirmek isteyelim:

    -

    - Alias /image/ /ftp/pub/image/ -

    +
    +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/ -

    +
    +AliasMatch /image/ /ftp/pub/image/
    +    
    +

    Aynı etkiyi elde etmek için bu gerekiyor:

    -

    - AliasMatch ^/image/(.*)$ /ftp/pub/image/$1 -

    +
    +AliasMatch ^/image/(.*)$ /ftp/pub/image/$1
    +    
    +

    Şü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 -

    +
    +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. +

    @@ -278,13 +292,14 @@ yönlendirir. 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.example.com/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://example.com/hizmet/fesmekan.txt isteğine karşılık istemciye isteği @@ -338,10 +353,11 @@ yönlendirir. bilmelidir (http_protocol.c dosyasında bulunan send_error_response işlevine bakınız).

    -

    Örnek:

    - Redirect permanent /bir http://example.com/iki
    - Redirect 303 /yedi http://example.com/baskabisey -

    +
    +Redirect permanent /bir http://example.com/iki
    +Redirect 303 /yedi http://example.com/baskabisey
    +    
    +
    top
    @@ -365,9 +381,10 @@ yönlendirme gönderir. sunucudaki aynı isimli JPEG dosyalarına yönlendirmek için şu yazılabilir:

    -

    - RedirectMatch (.*)\.gif$ http://baska.example.com$1.jpg -

    +
    +RedirectMatch (.*)\.gif$ http://baska.example.com$1.jpg
    +    
    +

    Alias ve AliasMatch arasındaki farklarla @@ -425,30 +442,31 @@ URL’ye yönlendirir. 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://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 @@ -465,14 +483,13 @@ 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 @@ -506,18 +523,20 @@ 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 -

    +
    +ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
    +    
    +

    Alias ve AliasMatch arasındaki farklarla diff --git a/docs/manual/mod/mod_auth_basic.html.en b/docs/manual/mod/mod_auth_basic.html.en index 4c332204..26bb807a 100644 --- a/docs/manual/mod/mod_auth_basic.html.en +++ b/docs/manual/mod/mod_auth_basic.html.en @@ -47,6 +47,7 @@

    Directives

    See also

    @@ -82,6 +83,73 @@ lower level modules directive. When using such modules, the order of processing is determined in the modules' source code and is not configurable.

    +
    +
    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
    + + + + + + + +
    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
    +

    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

    diff --git a/docs/manual/mod/mod_auth_basic.html.fr b/docs/manual/mod/mod_auth_basic.html.fr index a550f1c8..9cffb0ff 100644 --- a/docs/manual/mod/mod_auth_basic.html.fr +++ b/docs/manual/mod/mod_auth_basic.html.fr @@ -29,6 +29,8 @@  ja  |  ko 

    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.
    @@ -48,6 +50,7 @@

    Directives

    Voir aussi

    @@ -88,6 +91,77 @@ niveau traitement est dfini dans le code source des modules et n'est pas configurable.

    +
    +
    top
    +
    Description:Authentification HTTP de base
    Statut:Base
    IdentificateurdeModule:auth_basic_module
    + + + + + + + +
    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
    +

    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

    AuthBasicProvider Directive

    diff --git a/docs/manual/mod/mod_auth_basic.html.ja.utf8 b/docs/manual/mod/mod_auth_basic.html.ja.utf8 index 171a8f6d..b22e3cf8 100644 --- a/docs/manual/mod/mod_auth_basic.html.ja.utf8 +++ b/docs/manual/mod/mod_auth_basic.html.ja.utf8 @@ -51,6 +51,7 @@

    ディレクティブ

    参照

    @@ -93,6 +94,20 @@
    top
    +

    AuthBasicFake ディレクティブ

    + + + + + + + + +
    説明:Fake basic authentication using the given expressions for +username and password
    構文:AuthBasicFake off|username [password]
    デフォルト:none
    コンテキスト:ディレクトリ, .htaccess
    上書き:AuthConfig
    ステータス:Base
    モジュール:mod_auth_basic

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    AuthBasicProvider ディレクティブ

    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 e277c74b..63b00467 100644 --- a/docs/manual/mod/mod_auth_basic.html.ko.euc-kr +++ b/docs/manual/mod/mod_auth_basic.html.ko.euc-kr @@ -46,6 +46,7 @@
    top
    +
    説明:この位置に対する認証プロバイダを設定します。
    + + + + + + + +
    :Fake basic authentication using the given expressions for +username and password
    :AuthBasicFake off|username [password]
    ⺻:none
    :directory, .htaccess
    Override ɼ:AuthConfig
    :Base
    :mod_auth_basic

    The documentation for this directive has + not been translated yet. Please have a look at the English + version.

    +
    top

    AuthBasicProvider þ

    diff --git a/docs/manual/mod/mod_auth_digest.html.fr b/docs/manual/mod/mod_auth_digest.html.fr index 4423a348..b9ecd41f 100644 --- a/docs/manual/mod/mod_auth_digest.html.fr +++ b/docs/manual/mod/mod_auth_digest.html.fr @@ -259,7 +259,7 @@ les informations 0 et consulter le message d'erreur que renverra le serveur lorsqu'on essaiera de le dmarrer.

    -

    L'argument size s'exprime par dfaut en octets, mais +

    L'argument taille s'exprime par dfaut en octets, mais vous pouvez suffixer le nombre par un K ou un M pour spcifier respectivement des KiloOctets ou des MgaOctets. Par exemple, les directives qui suivent sont toutes diff --git a/docs/manual/mod/mod_authnz_ldap.html.en b/docs/manual/mod/mod_authnz_ldap.html.en index 4fa230c9..71990521 100644 --- a/docs/manual/mod/mod_authnz_ldap.html.en +++ b/docs/manual/mod/mod_authnz_ldap.html.en @@ -865,6 +865,21 @@ authorization 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

    diff --git a/docs/manual/mod/mod_authnz_ldap.html.fr b/docs/manual/mod/mod_authnz_ldap.html.fr index 09144c07..c13a9f8d 100644 --- a/docs/manual/mod/mod_authnz_ldap.html.fr +++ b/docs/manual/mod/mod_authnz_ldap.html.fr @@ -32,7 +32,7 @@ HTTP de base.
    -
    : ġ ڸ Ѵ
    Statut:Extension
    IdentificateurdeModule:authnz_ldap_module
    FichierSource:mod_authnz_ldap.c
    Compatibilit:Dosponible depuis les versions 2.1 et suprieures +
    Compatibilit:Disponible depuis les versions 2.1 et suprieures d'Apache

    Sommaire

    @@ -954,6 +954,21 @@ connexion 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

    diff --git a/docs/manual/mod/mod_authz_core.html.en b/docs/manual/mod/mod_authz_core.html.en index 3cb249dc..25da33bc 100644 --- a/docs/manual/mod/mod_authz_core.html.en +++ b/docs/manual/mod/mod_authz_core.html.en @@ -245,7 +245,7 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in decisions on arbitrary expressions.

    -        Require expr %{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17 
    +        Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17"
         
    @@ -515,8 +515,7 @@ Require group admin

    See also

      -
    • Authentication, Authorization, - and Access Control
    • +
    • Access control howto
    • Authorization Containers
    • mod_authn_core
    • mod_authz_host
    • diff --git a/docs/manual/mod/mod_authz_core.html.fr b/docs/manual/mod/mod_authz_core.html.fr index e1650fbf..8b5cf729 100644 --- a/docs/manual/mod/mod_authz_core.html.fr +++ b/docs/manual/mod/mod_authz_core.html.fr @@ -74,40 +74,40 @@ d'autorisation 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 utilis pour contrler l'accs plusieurs localisations. + 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 au niveau de - plusieurs serveurs ldap : + rpertoire de vrifier l'appartenance un groupe dans plusieurs + serveurs ldap :

       <AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx>
      -    AuthLDAPBindDN cn=monutilisateur,o=ctx
      -    AuthLDAPBindPassword monmotdepasse
      -    AuthLDAPURL ldap://serveur.ldap/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=monautreutilisateur,o=dev
      -    AuthLDAPBindPassword monsecondmotdepasse
      -    AuthLDAPURL ldap://autre.serveur.ldap/o=dev?cn
      +    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
      -
      -    #Implicitement, c'est l'un OU l'autre
      +    
      +    #implied OR operation
           Require ldap-group-alias1
           Require ldap-group-alias2
       </Directory>
      @@ -121,7 +121,7 @@ Alias /secure /webpages/secure
       
           

      Les directives de conteneur d'autorisation <RequireAll>, <RequireAny> et <RequireNone> - peuvent tre combines entre elles et avec la directive Require pour laborer une + 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. @@ -132,7 +132,7 @@ Alias /secure /webpages/secure 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 Employes temporaires.

      + au groupe LDAP Employs temporaires.

       <Directory /www/mydocs>
      @@ -143,14 +143,14 @@ Alias /secure /webpages/secure
                   Require group admins
                   Require ldap-group cn=Administrators,o=Airius
                       <RequireAny>
      -                Require group ventes
      -                Require ldap-attribute dept="ventes"
      +                Require group sales
      +                Require ldap-attribute dept="sales"
                       </RequireAny>
                   </RequireAll>
               </RequireAny>
               <RequireNone>
                   Require group temps
      -            Require ldap-group cn=Employes Temporaires,o=Airius
      +            Require ldap-group cn=Temporary Employees,o=Airius
               </RequireNone>
           </RequireAll>
       </Directory>
      @@ -248,7 +248,7 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in
         d'accs en fonction d'expressions arbitraires.

      -         Require expr %{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17
      +         Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17"
           
      @@ -471,7 +471,7 @@ Require group admin

      Les contrles d'accs appliqus de cette manire sont effectifs - pour toutes les mthodes. C'est en effet + 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 @@ -509,13 +509,13 @@ Require group admin Require suivantes sont ignores.

      Avertissement propos de la scurit

      -

      Prtez une attention particulire aux directives d'autorisation +

      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.

      + 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.

      @@ -523,8 +523,7 @@ Require group admin

      Voir aussi

      -

      See also

      +

      Topics

      +

      See also

      +
      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

      AuthDBMGroupFile Directive

      diff --git a/docs/manual/mod/mod_authz_dbm.html.fr b/docs/manual/mod/mod_authz_dbm.html.fr index e74af728..7479ff69 100644 --- a/docs/manual/mod/mod_authz_dbm.html.fr +++ b/docs/manual/mod/mod_authz_dbm.html.fr @@ -48,11 +48,33 @@ d'Apache
    • AuthDBMGroupFile
    • AuthzDBMType
    -

    Voir aussi

    +

    Sujets

    +

    Voir aussi

    +
    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

    AuthDBMGroupFile Directive

    diff --git a/docs/manual/mod/mod_autoindex.html.tr.utf8 b/docs/manual/mod/mod_autoindex.html.tr.utf8 index 1aa18dec..7bc01bca 100644 --- a/docs/manual/mod/mod_autoindex.html.tr.utf8 +++ b/docs/manual/mod/mod_autoindex.html.tr.utf8 @@ -30,7 +30,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -210,10 +209,11 @@ 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
    @@ -238,9 +238,10 @@ 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
    @@ -264,9 +265,10 @@ 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
    @@ -287,10 +289,11 @@ metni belirler.metin boşluk karakterleri içeriyorsa çift tırnak (") içine alınmalıdır.

    -

    Örnek

    - AddDescription "Mars Gezegeni" mars.gif
    - AddDescription "Dostum Marshall" dostlar/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 @@ -359,11 +362,13 @@ metni belirler. dolayısıyla IndexOptions HTMLTable kullanıyorsanız gereksizdir.

    -

    Örnekler

    - 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 *~
    +    
    +

    Mümkünse AddIcon yerine AddIconByType yönergesi tercih edilmelidir.

    @@ -391,9 +396,10 @@ göre belirler.

    MIME-kodlaması olarak x-compress gibi geçerli bir içerik kodlaması belirtilmelidir.

    -

    Örnek

    - AddIconByEncoding /icons/compress.png x-compress -

    +
    +AddIconByEncoding /icons/compress.png x-compress
    +    
    +
    top
    @@ -419,9 +425,10 @@ 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
    @@ -441,9 +448,10 @@ belirler. bir göreli URL (% öncelemeli) veya tam nitelenmiş uzak bir URL belirtir.

    -

    Örnek

    - DefaultIcon /icon/unknown.png -

    +
    +DefaultIcon /icon/unknown.png
    +    
    +
    top
    @@ -461,9 +469,10 @@ 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 @@ -473,9 +482,10 @@ 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 @@ -484,9 +494,10 @@ 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 @@ -521,10 +532,10 @@ 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
    @@ -547,9 +558,10 @@ belirler.IndexIgnore ataması yapabilirsiniz. Liste öntanımlı olarak içinde bulunulan dizini (./) içerir.

    -

    - IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t -

    +
    +IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
    +    
    +

    Düzenli İfadeler

    Bu yönerge, <DirectoryMatch> gibidüzenli ifadeler içeren yapılandırma @@ -573,15 +585,16 @@ belirler. 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> -

    +
    +<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 @@ -628,9 +641,10 @@ belirler. dosya sisteminin Unicode dosya isimleri kullanıp kullanmamasına bağlıdır). -

    Örnek

    - IndexOptions Charset=UTF-8 -

    +
    +IndexOptions Charset=UTF-8
    +      
    +
    DescriptionWidth=[n | *]
    @@ -829,9 +843,10 @@ belirler.
    Type anahtar sözcüğü üretilen sayfanın MIME içerik türünün belirtilebilmesini sağlar. text/html öntanımlıdır. -

    Örnek:

    - IndexOptions Type=text/plain -

    +
    +IndexOptions Type=text/plain
    +      
    +
    VersionSort
    @@ -878,21 +893,21 @@ belirler. 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.

    @@ -908,10 +923,11 @@ belirler. 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 @@ -978,9 +994,10 @@ 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. @@ -1026,13 +1043,17 @@ belirler. 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.

    diff --git a/docs/manual/mod/mod_cache.html.fr b/docs/manual/mod/mod_cache.html.fr index e65b7141..d8a8da84 100644 --- a/docs/manual/mod/mod_cache.html.fr +++ b/docs/manual/mod/mod_cache.html.fr @@ -193,7 +193,7 @@ LoadModule cache_module modules/mod_cache.so </IfModule> # Lorsqu'on sert de mandataire, on ne met pas en cache la liste -# des mises jour de scurit + # des mises jour de scurit CacheDisable http://security.update.server/update-list/ </IfModule> @@ -325,7 +325,7 @@ AddOutputFilterByType CACHE;DEFLATE text/plain
     # Mise en cache du contenu avant l'intervention de mod_include et
    -   # mod_deflate
    +# mod_deflate
     CacheQuickHandler off
     AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
       
    @@ -338,7 +338,7 @@ AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
     # Mise en cache du contenu entre les interventions de mod_include et
    -   # mod_deflate
    +# mod_deflate
     CacheQuickHandler off
     AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html
       
    diff --git a/docs/manual/mod/mod_cache_socache.html b/docs/manual/mod/mod_cache_socache.html new file mode 100644 index 00000000..9294ba71 --- /dev/null +++ b/docs/manual/mod/mod_cache_socache.html @@ -0,0 +1,5 @@ +# GENERATED FROM XML -- DO NOT EDIT + +URI: mod_cache_socache.html.en +Content-Language: en +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_cache_socache.html.en b/docs/manual/mod/mod_cache_socache.html.en new file mode 100644 index 00000000..bfccda2a --- /dev/null +++ b/docs/manual/mod/mod_cache_socache.html.en @@ -0,0 +1,277 @@ + + + +mod_cache_socache - Apache HTTP Server + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_cache_socache

    +
    +

    Available Languages:  en 

    +
    +
    Açıklama:Unix ls veya Win32 dir kabuk komutunun yaptığı gibi dizin içeriğini listeler.
    Durum:Temel
    + + +
    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 directory root under which cache files are +stored
    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 maximum 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.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 

    +
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our 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 index 34744604..82d3d13d 100644 --- a/docs/manual/mod/mod_dav_fs.html.fr +++ b/docs/manual/mod/mod_dav_fs.html.fr @@ -29,8 +29,6 @@  ja  |  ko 

    -
    Cette traduction peut tre prime. Vrifiez la version - anglaise pour les changements rcents.
    diff --git a/docs/manual/mod/mod_dir.html.tr.utf8 b/docs/manual/mod/mod_dir.html.tr.utf8 index 41e5e701..3d6bd463 100644 --- a/docs/manual/mod/mod_dir.html.tr.utf8 +++ b/docs/manual/mod/mod_dir.html.tr.utf8 @@ -30,7 +30,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    Description:Implmente le fournisseur filesystem pour mod_dav
    Statut:Extension
    @@ -89,9 +88,10 @@ 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, @@ -100,9 +100,10 @@

    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 @@ -110,9 +111,35 @@

    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>
    +    
    + @@ -137,9 +164,10 @@ DirectoryIndexRedirect ise harici bir yönlendirmeye sebep olur.

    -

    Örnek

    - DirectoryIndexRedirect on -

    +
    +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.

    @@ -156,7 +184,6 @@ -
    Açıklama:Bölü çizgisiyle biten yönlendirmeleri yapar ve dizin içeriği dosyalarını sunar.
    Durum:Temel
    Modül Betimleyici:dir_module
    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 @@ -182,15 +209,14 @@ 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> -

    +
    +# 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 @@ -212,20 +238,22 @@ - + +
    Açıklama:Bir dosya ile eşleşmeyen istekler için öntanımlı URL tanımlar
    Sözdizimi:FallbackResource yerel-url
    Sözdizimi:FallbackResource disabled | yerel-url
    Öntanımlı:None - 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.

    @@ -239,23 +267,26 @@ -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> -
    -

    + +
    +<Directory /web/example.com/htdocs/blog>
    +  FallbackResource /blog/index.php
    +</Directory>
    +    
    + +
    diff --git a/docs/manual/mod/mod_env.html.en b/docs/manual/mod/mod_env.html.en index f224138d..29644127 100644 --- a/docs/manual/mod/mod_env.html.en +++ b/docs/manual/mod/mod_env.html.en @@ -69,7 +69,7 @@ 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.

    diff --git a/docs/manual/mod/mod_env.html.tr.utf8 b/docs/manual/mod/mod_env.html.tr.utf8 index 094615e1..0627c078 100644 --- a/docs/manual/mod/mod_env.html.tr.utf8 +++ b/docs/manual/mod/mod_env.html.tr.utf8 @@ -94,9 +94,10 @@ etmek için kullanılır. 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
    +    
    +

    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 @@ -126,9 +127,10 @@ etmek için kullanılır.

    CGI betiklerine ve SSI sayfalarına bir daha aktarılmamak üzere bir dahili ortam değişkenini siler.

    -

    Örnek

    - UnsetEnv LD_LIBRARY_PATH -

    +
    +UnsetEnv LD_LIBRARY_PATH
    +    
    +
    diff --git a/docs/manual/mod/mod_heartbeat.html b/docs/manual/mod/mod_heartbeat.html index 3bbe7cf8..7f2d43e1 100644 --- a/docs/manual/mod/mod_heartbeat.html +++ b/docs/manual/mod/mod_heartbeat.html @@ -3,3 +3,7 @@ URI: mod_heartbeat.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_heartbeat.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_heartbeat.html.en b/docs/manual/mod/mod_heartbeat.html.en index 25d42a44..6ec416cc 100644 --- a/docs/manual/mod/mod_heartbeat.html.en +++ b/docs/manual/mod/mod_heartbeat.html.en @@ -24,7 +24,8 @@

    Apache Module mod_heartbeat

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -103,7 +104,8 @@ 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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_heartbeat

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Sends messages with server status to frontend proxy
    Status:Experimental
    + + + +
    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
    +

    HeartbeatAddress Directive

    + + + + + + + +
    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_heartmonitor.html b/docs/manual/mod/mod_heartmonitor.html index 5ac954ac..d72d8416 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 0a52f15c..65abdfcb 100644 --- a/docs/manual/mod/mod_heartmonitor.html.en +++ b/docs/manual/mod/mod_heartmonitor.html.en @@ -24,7 +24,8 @@

    Apache Module mod_heartmonitor

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -119,7 +120,8 @@ heartbeat requests to this server
    -

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_heartmonitor

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Centralized monitor for mod_heartbeat origin servers
    Status:Experimental
    + + + +
    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
    +

    HeartbeatListen Directive

    + + + + + + + +
    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
    +

    HeartbeatMaxServers Directive

    + + + + + + + +
    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
    +

    HeartbeatStorage Directive

    + + + + + + + +
    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_imagemap.html b/docs/manual/mod/mod_imagemap.html index 0436d500..4b978b30 100644 --- a/docs/manual/mod/mod_imagemap.html +++ b/docs/manual/mod/mod_imagemap.html @@ -4,6 +4,10 @@ URI: mod_imagemap.html.en 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 53b17a72..125f9cd6 100644 --- a/docs/manual/mod/mod_imagemap.html.en +++ b/docs/manual/mod/mod_imagemap.html.en @@ -25,6 +25,7 @@

    Apache Module mod_imagemap

    Available Languages:  en  | + fr  |  ko 

    @@ -382,6 +383,7 @@ 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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_imagemap

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    Description:Server-side imagemap processing
    + + +
    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
    +

    ImapBase Directive

    + + + + + + + + +
    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
    +

    ImapDefault Directive

    + + + + + + + + +
    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
    +

    ImapMenu Directive

    + + + + + + + + +
    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 ad2dbf0b..eaf54f16 100644 --- a/docs/manual/mod/mod_imagemap.html.ko.euc-kr +++ b/docs/manual/mod/mod_imagemap.html.ko.euc-kr @@ -25,6 +25,7 @@

    ġ mod_imagemap

    ֽ ƴմϴ. @@ -359,6 +360,7 @@
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    + + + + +
    <-
    + +
    +

    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
    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 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 errmsg="[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_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, 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).
    +
    +
    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
    +

    SSIEndTag Directive

    + + + + + + + +
    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
    +

    SSIErrorMsg Directive

    + + + + + + + + +
    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
    +

    SSIETag Directive

    + + + + + + + + +
    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
    +

    SSILastModified Directive

    + + + + + + + + +
    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
    +

    SSILegacyExprParser Directive

    + + + + + + + + +
    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
    +

    SSIStartTag Directive

    + + + + + + + +
    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
    +

    SSITimeFormat Directive

    + + + + + + + + +
    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
    +

    SSIUndefinedEcho Directive

    + + + + + + + + +
    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
    +

    XBitHack Directive

    + + + + + + + + +
    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 31ba090d..6d6f84f2 100644 --- a/docs/manual/mod/mod_include.html.ja.utf8 +++ b/docs/manual/mod/mod_include.html.ja.utf8 @@ -25,6 +25,7 @@

    Apache モジュール mod_include

    翻訳済み言語:  en  | + fr  |  ja 

    この日本語訳はすでに古くなっている @@ -869,6 +870,7 @@ server.

    翻訳済み言語:  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.
    + + + + +
    <-
    + +
    +

    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 leurs + 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 un saut la 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"
    %aLe port et l'adresse IP distants
    %{c}aPort et adresse IP distants sous-jacents 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 "Common Log 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
    %hNom de l'hte distant. Contiendra son 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 htes, 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 peuvent avoir t modifis 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. Intressant 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 [18/Sep/2011:19:18:28 -0400]) + Le dernier nombre indique le dcalage horaire par rapport l'heure GMT.
    %{format}tLa date, sous la forme spcifie par format, qui devrait + tre au format tendu strftime(3) (possiblement + 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 galement 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. Vous pouvez en revanche utiliser plusieurs symboles + %{format}t.
    %TLe temps mis pour servir la requte, en secondes.
    %uLe nom d'utilisateur distant, si la requte a fait l'objet d'une + authentification par le client (ce champ peut tre considr comme + erron ou sans intrt si le statut de retour (%s) est + 401).
    %ULe chemin de la requte, l'exclusion de toute chane + d'arguments ("query string").
    %vLe nom canonique du serveur qui a servi la requte, dfini + par la directive ServerName.
    %VLe 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.
    %OLe nombre d'octets envoys, y compris les en-ttes, ne peut + tre nul. Ncessite l'activation de + mod_logio.
    + +

    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 "%". La liste des codes de statut peut tre prcde + d'un "!" pour formuler une ngation.

    + + + + + + + + + +
    Chane de caractres de formatageInterprtation
    %400,501{User-agent}iEnregistrera l'en-tte User-agent uniquementdans le + cas d'une erreur 400 ou 501. Avec les autres codes de statut, c'est la + chane littrale "-" qui sera enregistre. +
    %!200,304,302{Referer}i + Enregistrera l'en-tte Referer pour toutes les requtes qui + ne renvoient aucun 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 ralis sur ces chanes, et il + fallait tre trs prudent lors de l'exploitation des journaux + bruts.

    + +

    la diffrence de la version 1.3, dans 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 (Common Log Format - 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 tendu/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
    +

    BufferedLogs Directive

    + + + + + + + +
    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 conserve plusieurs 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 + prcaution car un crash peut provoquer la perte de donnes de + journalisation.
    + +
    +
    top
    +

    CustomLog Directive

    + + + + + + +
    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 contrle + la journalisation des requtes destines au serveur. Un format de + journalisation est spcifi, et la journalisation peut s'effectuer de + manire conditionnelle en fonction des caractristiques de la + requte au moyen de 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
    +

    LogFormat Directive

    + + + + + + + +
    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
    +

    TransferLog Directive

    + + + + + + +
    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 578ee755..2fcfe3ef 100644 --- a/docs/manual/mod/mod_log_config.html.ja.utf8 +++ b/docs/manual/mod/mod_log_config.html.ja.utf8 @@ -25,6 +25,7 @@

    Apache モジュール mod_log_config

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

    @@ -460,6 +461,7 @@

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

    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 eea91e8d..63538df0 100644 --- a/docs/manual/mod/mod_log_config.html.ko.euc-kr +++ b/docs/manual/mod/mod_log_config.html.ko.euc-kr @@ -25,6 +25,7 @@

    ġ mod_log_config

    :  en  | + fr  |  ja  |  ko  |  tr 

    @@ -391,6 +392,7 @@

    :  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/mod_log_config.html.tr.utf8 b/docs/manual/mod/mod_log_config.html.tr.utf8 index 96d8e2bd..13e5b284 100644 --- a/docs/manual/mod/mod_log_config.html.tr.utf8 +++ b/docs/manual/mod/mod_log_config.html.tr.utf8 @@ -25,11 +25,11 @@

    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.
    @@ -401,21 +401,23 @@ expr=ifade]

    Ö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" -

    +
    +# 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.

    + 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 @@ -423,19 +425,21 @@ expr=ifade] 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
    @@ -473,9 +477,10 @@ expr=ifade] 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
    -    

    + +
    top
    @@ -494,16 +499,17 @@ expr=ifade] 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 

    diff --git a/docs/manual/mod/mod_log_debug.html b/docs/manual/mod/mod_log_debug.html index 7e3effaa..9acc6a02 100644 --- a/docs/manual/mod/mod_log_debug.html +++ b/docs/manual/mod/mod_log_debug.html @@ -3,3 +3,7 @@ URI: mod_log_debug.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_log_debug.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_log_debug.html.en b/docs/manual/mod/mod_log_debug.html.en index ce43cd57..d3d4bd70 100644 --- a/docs/manual/mod/mod_log_debug.html.en +++ b/docs/manual/mod/mod_log_debug.html.en @@ -24,7 +24,8 @@

    Apache Module mod_log_debug

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    Açıklama:Sunucuya yapılan isteklerin günlük kayıtlarının tutulması
    Durum:Temel
    @@ -114,7 +115,7 @@ 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:

    Description:Additional configurable debug logging
    Status:Experimental
    @@ -145,7 +146,8 @@
    -

    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.
    + + + + +
    <-
    + +
    +

    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
    +
    +

    Directives

    + +

    Sujets

    +
    +
    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
    +

    LogMessage Directive

    + + + + + + + +
    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_forensic.html.tr.utf8 b/docs/manual/mod/mod_log_forensic.html.tr.utf8 index 66e1c5d7..83d281c1 100644 --- a/docs/manual/mod/mod_log_forensic.html.tr.utf8 +++ b/docs/manual/mod/mod_log_forensic.html.tr.utf8 @@ -29,7 +29,6 @@  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -109,6 +108,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

    diff --git a/docs/manual/mod/mod_lua.html.en b/docs/manual/mod/mod_lua.html.en index e8286ed9..5f722327 100644 --- a/docs/manual/mod/mod_lua.html.en +++ b/docs/manual/mod/mod_lua.html.en @@ -50,10 +50,18 @@ Until it is declared stable, usage and behavior may change 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.

    +
    +

    Directives

  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • @@ -76,8 +87,10 @@ Be sure to check the CHANGES file before upgrading.
  • Writing Authorization Providers
  • Writing Hooks
  • Data Structures
  • +
  • Built in functions
  • Logging Functions
  • apache2 Package
  • +
  • Modifying contents with Lua filters
  • Database connectivity
  • top
    @@ -106,6 +119,9 @@ ending in .lua by invoking that file's handle function.

    +

    For more flexibility, see LuaMapHandler. +

    +
    top

    Writing Handlers

    @@ -120,7 +136,7 @@ something like this:

    -example.lua
    +example.lua
    -- example handler require "string" @@ -132,19 +148,27 @@ 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\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 +-- use our own Error contents r:puts("Unsupported HTTP method " .. r.method) + r.status = 405 + return apache2.ok + else +-- use the ErrorDocument + return 501 end + return apache2.OK end
    @@ -187,7 +211,7 @@ without authentication, or if the authenticated user matches the second argument:

    -authz_provider.lua
    +authz_provider.lua
    require 'apache2' @@ -221,18 +245,90 @@ LuaAuthzProvider foo authz_provider.lua authz_check_foo

    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 purpose, 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:

    + +
    Açıklama:Sunucuya yapılan isteklerin adli günlük kayıtlarının tutulması
    Durum:Eklenti
    Modül Betimleyici:log_forensic_module
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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
    Logging(none)Once a request has been handled, it enters several logging phases, + which logs the request in either the error or access log
    -

    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' @@ -248,15 +344,16 @@ 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' @@ -279,202 +376,681 @@ 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_prefix string no
    context_document_root string no
    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_id string noThe 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_ip string noThe IP of the user agent making the request
    + +
    + +
    top
    +
    +

    Built in functions

    + +

    The request_rec object has (at least) the following methods:

    + +
    +r:flush()   -- flushes the output buffer.
    +            -- Returns true if the flush was successful, false otherwise.
     
    -        

    The request_rec has (at least) the following methods:

    +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:addoutputfilter(name|function) -- add an output filter
    -        
    +
    +r:addoutputfilter(name|function) -- add an output filter:
     
    -        
    -        r:parseargs() -- returns a lua table containing the request's query string arguments
    -        
    +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:
     
    -        
    -r:parsebody([sizeLimit]) -- parse the request body as a POST and return  a lua table.
    +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.
    -        
    + -- 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:puts("hello", " world", "!") -- print to response body
    -        
    +
    +r:write("a single string") -- print to response body, self explanatory
    +
    -
    -        r:write("a single string") -- print to response body
    -        
    - -
    +
    +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.
    -        
    + -- 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([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.
    +
    - -
    top
    @@ -513,8 +1089,52 @@ r:dbacquire(dbType[, dbParams]) -- Acquires a connection to a database and retur
    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

    @@ -524,11 +1144,13 @@ r:dbacquire(dbType[, dbParams]) -- Acquires a connection to a database and retur on the most popular database engines (mySQL, PostgreSQL, FreeTDS, ODBC, SQLite, Oracle) as well as mod_dbd.

    -

    Connecting and firing off queries is as easy as:

    +

    The example below shows how to acquire a database handle and return information from a table:

    -function handler(r)
    -    local database, err = r:dbacquire("mysql", "server=localhost&user=root&database=mydb")
    +function handle(r)
    +    -- Acquire a database handle
    +    local database, err = r:dbacquire("mysql", "server=localhost,user=root,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
    @@ -546,7 +1168,7 @@ end
         

    - To utilize mod_dbd, simply specify mod_dbd + To utilize mod_dbd, specify mod_dbd as the database type, or leave the field blank:

    @@ -570,7 +1192,7 @@ local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1")
     -- 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
    +    local result, errmsg = statement:query(20) -- run the statement with age > 20
     end
     
     -- Fetch a prepared statement from a DBDPrepareSQL directive:
    @@ -698,13 +1320,53 @@ collectgarbage() -- close the handle via GC
     

    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 bar
    +  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

    + + + + + + + + +
    Description:Configure the compiled code cache.
    Syntax:LuaCodeCache stat|forever|never
    Default:LuaCodeCache stat
    Context:server config, virtual host, directory, .htaccess
    Override:All
    Status:Experimental
    Module:mod_lua

    + Specify the behavior of the in-memory code cache. The default + is stat, which stats the top level script (not any included + ones) each time that file is needed, and reloads it if the + modified time indicates it is newer than the one it has + already loaded. The other values cause it to keep the file + cached forever (don't stat and replace) or to never cache the + file.

    + +

    In general stat or forever is good for production, and stat or never + for development.

    + +

    Examples:

    +LuaCodeCache stat
    +LuaCodeCache forever
    +LuaCodeCache never
    +    
    @@ -796,7 +1458,7 @@ end
    top

    LuaHookFixups Directive

    - @@ -829,7 +1491,48 @@ 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
    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

    @@ -894,7 +1597,29 @@ end 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

    @@ -915,6 +1640,162 @@ end

    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.5.0 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
    +<FilesMatch "\.lua>
    +  SetInputFilter myInputFilter
    +</FilesMatch>
    +
    + +
    +--[[
    +    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

    + + + + + + + +
    Description:Map a path to a lua handler
    Syntax:LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]
    Context:server config, virtual host, directory, .htaccess
    Override:All
    Status:Experimental
    Module:mod_lua
    +

    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 + issues.

    +

    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
    +
    + +

    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.5.0 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
    +<FilesMatch "\.lua>
    +  SetOutputFilter myOutputFilter
    +</FilesMatch>
    +
    + +
    +--[[
    +    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
    +
    + +

    +See "Modifying contents with Lua filters" for more +information. +

    +
    top

    LuaPackageCPath Directive

    @@ -961,7 +1842,14 @@ LuaPackagePath /scripts/lib/?/init.lua 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.

    @@ -986,14 +1874,14 @@ LuaPackagePath /scripts/lib/?/init.lua

    LuaScope Directive

    - +
    Description:One of once, request, conn, thread -- default is once
    Syntax:LuaScope once|request|conn|thread
    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"

    @@ -1004,10 +1892,30 @@ LuaPackagePath /scripts/lib/?/init.lua request scoped.
    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 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. +

    diff --git a/docs/manual/mod/mod_lua.html.fr b/docs/manual/mod/mod_lua.html.fr index dd0b57b6..ed9b608e 100644 --- a/docs/manual/mod/mod_lua.html.fr +++ b/docs/manual/mod/mod_lua.html.fr @@ -53,10 +53,20 @@ ce qu'il passe au stade stable, et ce m 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.

    +
    +
  • LuaHookTranslateName
  • LuaHookTypeChecker
  • LuaInherit
  • +
  • LuaInputFilter
  • +
  • LuaMapHandler
  • +
  • LuaOutputFilter
  • LuaPackageCPath
  • LuaPackagePath
  • LuaQuickHandler
  • @@ -80,8 +93,10 @@ jour.
  • Ecriture de fonctions d'accroche (hooks)
  • Structures de donnes
  • +
  • Mthodes de l'objet request_rec
  • Fonctions de journalisation
  • Paquet apache2
  • +
  • Modification de contenu avec les filtres lua
  • Connectivit aux bases de donnes
  • top
    @@ -111,6 +126,9 @@ 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

    @@ -126,7 +144,7 @@ le style de CGI. Une fonction de gestionnaire se pr
    -example.lua
    +example.lua
    -- exemple de gestionnaire require "string" @@ -138,20 +156,28 @@ 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\n", k, v) ) - end + 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
    @@ -230,19 +256,98 @@ LuaAuthzProvider foo authz_provider.lua authz_check_foo 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. Il existe aussi des accroches usage -gnral qui s'excutent simplement des moments opportuns du cycle -de vie de la requte.

    +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.
    JournalisationaucuneLorsqu'une requte a t traite, plusieurs phases de + journalisation interviennent, et enregistrent leurs rsultats + dans les fichiers d'erreur ou d'accs.
    -

    Les fonctions d'accroche acceptent l'objet de la requte comme seul -et unique argument. Elles peuvent renvoyer une valeur, selon la -fonction, mais il s'agit en gnral d'un +

    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, +que vous pouvez crire dans Lua sous la forme apache2.OK, apache2.DONE, ou apache2.DECLINED.

    +
    -translate_name.lua
    +translate_name.lua
    -- exemple d'accroche qui rcrit un URI en chemin du systme de fichiers. @@ -259,15 +364,16 @@ end
    +
    -translate_name2.lua
    +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: actuellement, il est impossible de prvoir si cette action - s'excute avant ou aprs mod_alias. + Note: utilisez le drapeau early/late de la directive pour + l'excuter avant ou aprs mod_alias. --]] require 'apache2' @@ -291,210 +397,754 @@ end

    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 (voir httpd.h en - attendant que cette documentation soit plus complte), la + 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).

    - - - +
    + + + + + + + - + + - + + - + + - - + + + + + + + + + + + + + + + + + + + + - + + - + + - + + - + + - - + + - + + - + + - + + - + + - + + - + + - - + + + + + + + + + + + + + + + + + + + + + - + + - + + + + + + + + - + + - + + + + + + + + - + + - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + - + + - + + - + + - + + -
    Nom Type Lua ModifiableDescription
    allowoverridesstringnonL'option AllowOverride s'applique la requte courante.
    ap_auth_type string nonCe champ contient le type d'authentification effectue + (par exemple basic)
    args string ouiLa chane de paramtres de la requte (par exemple + foo=bar&name=johnsmith)
    assbackwards boolean noncontient 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_filename string nonLe nom de fichier canonique de la requte
    content_encoding string nonLe type de codage du contenu de la requte courante
    content_type string ouiLe 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_prefix string non
    context_document_root string non
    document_root string nonLa racine des documents du serveur
    err_headers_out table nonL'en-tte MIME de l'environnement pour la rponse, crit + mme en cas d'erreur et conserv pendant les redirections + internes
    filename string ouiLe 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.
    handler string ouiLe 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_in table ouiLes en-ttes MIME de l'environnement de la requte. Il + s'agit des en-ttes comme Host, User-Agent, + Referer, etc...
    headers_out table ouiLes en-ttes MIME de l'environnement de la rponse.
    hostname string nonLe nom d'hte, tel que dfini par l'en-tte + Host: ou par un URI complet.
    log_id
    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_id string nonL'identifiant de la requte dans les journaux d'accs ou + d'erreur.
    method string nonLa mthode de la requte, par exemple GET ou + POST.
    notes table ouiUne liste de notes qui peuvent tre transmises d'un module + l'autre.
    optionsstringnonLa valeur de la directive Options pour la requte + courante.
    path_info string nonLa valeur de PATH_INFO extraite de la requte.
    portnumbernonLe port du serveur utilis par la requte.
    protocol string nonLe protocole utilis, par exemple HTTP/1.1
    proxyreq string ouiIndique 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.
    range string nonLe 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_env table ouiLe jeu de variables d'environnement pour cette requte.
    startednumbernonLe moment o le serveur a t (re)dmarr, en secondes + depuis epoch (1er janvier 1970)
    status number ouiLe code de retour (courant) pour cette requte, par + exemple 200 ou 404.
    the_request string nonLa chane de la requte telle qu'elle a t envoye par le + client, par exemple GET /foo/bar HTTP/1.1.
    unparsed_uri string nonLa partie URI non interprte de la requte
    uri string ouiL'URI aprs interprtation par httpd
    user string ouiSi une authentification a t effectue, nom de + l'utilisateur authentifi.
    useragent_ip string nonL'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")
    +
    + -

    La structure request_rec possde (au minimum) les mthodes - suivantes :

    -
    -        r:addoutputfilter(name|function) -- ajoute un filtre en sortie
    -        
    +
    +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:parseargs() -- renvoie une table lua contenant la chane
    -	d'arguments de la requte
    -        
    -
    -        r:parsebody()([sizeLimit]) -- interprte le corps de la requte
    -	en tant que POST et renvoie une table lua. Un nombre optionnel
    -	peut tre fourni pour spcifier le nombre maximal d'octets 
    -	interprter. La valeur par dfaut est 8192.
    -        
    +
    +r:puts("bonjour", " le monde", "!") -- affichage dans le corps de la rponse
    +
    -
    -        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:write("une simple chane") -- affichage dans le
    -	corps de la rponse
    -        
    +
    +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:dbacquire(dbType[, dbParams]) -- Acquiert une connexion  une
    +
    +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([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.
    +
    - -
    top
    @@ -535,8 +1185,56 @@ contenu suivant :

    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

    @@ -549,7 +1247,7 @@ commandes aupr

    L'exemple suivant montre comment se connecter une base de donnes et extraire des informations d'une table :

    -function handler(r)
    +function handle(r)
         -- connexion  la base de donnes
         local database, err = r:dbacquire("mysql", "server=localhost,user=root,dbname=mydb")
         if not err then
    @@ -741,13 +1439,54 @@ le cas des requ
     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 bar
    +  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

    + + + + + + + + +
    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
    +    
    @@ -888,7 +1627,50 @@ traitement de la requ 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 -- 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

    @@ -984,6 +1766,66 @@ parentes sont fusionn configuration parentes.

    top
    +

    LuaInputFilter Directive

    + + + + + + + +
    Description:Provide a Lua function for content input filtering
    Syntaxe:LuaInputFilter filter_name /path/to/lua/script.lua function_name
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:2.5.0 and later

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    +
    top
    +

    LuaMapHandler Directive

    + + + + + + + +
    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
    +

    LuaOutputFilter Directive

    + + + + + + + +
    Description:Provide a Lua function for content output filtering
    Syntaxe:LuaOutputFilter filter_name /path/to/lua/script.lua function_name
    Contexte:configuration du serveur
    Statut:Exprimental
    Module:mod_lua
    Compatibilit:2.5.0 and later

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    +
    top

    LuaPackageCPath Directive

    @@ -1025,11 +1867,21 @@ LuaPackagePath /scripts/lib/?/init.lua - + -
    Description:Ajoute un rpertoire au package.cpath de lua
    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
    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.

    @@ -1057,8 +1909,7 @@ relatifs dans les directives de mod_lua - + @@ -1077,11 +1928,33 @@ once 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. +

    diff --git a/docs/manual/mod/mod_macro.html b/docs/manual/mod/mod_macro.html new file mode 100644 index 00000000..1b2896af --- /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 00000000..453a924a --- /dev/null +++ b/docs/manual/mod/mod_macro.html.en @@ -0,0 +1,240 @@ + + + +mod_macro - Apache HTTP Server + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_macro

    +
    +

    Available Languages:  en  | + fr 

    +
    +
    Description:Une valeur parmi once, request, conn, thread -- la valeur par dfaut est once
    Syntaxe:LuaScope once|request|conn|thread -- la valeur par dfaur est -once
    Syntaxe:LuaScope once|request|conn|thread|server [min] [max]
    Dfaut:LuaScope once
    Contexte:configuration du serveur, serveur virtuel, rpertoire, .htaccess
    AllowOverride:All
    + + + +
    Description:This module provides usage of macros within apache runtime configuration files
    Status:Base
    ModuleIdentifier:macro_module
    SourceFile:mod_macro.c
    Compatibility:Available in Apache HTTPD 2.4.5 and later
    +

    Summary

    + + +

    This modules provides macros within apache runtime configuration files. + These macros have parameters. They are expanded when used (parameters are + substituted by their values given as an argument), and the result is + processed normally.

    +
    +

    Directives

    + +

    Topics

    +
    +
    top
    +
    +

    Features

    + +

    Definition of a macro:

    +
      +
    • macro definition within a <Macro> section, following + the apache style.
    • +
    • user defined names for the macro and its parameters.
    • +
    • macro names are case-insensitive, like apache directives.
    • +
    • macro parameter names are case sensitive.
    • +
    • macro parameters must have distinct names.
    • +
    • error on empty parameter names.
    • +
    • redefining a macro generates a warning.
    • +
    • macro definitions can be nested... (but what for?)
    • +
    • warn about unused macro parameters.
    • +
    • warn about macro parameter names which prefix one another.
    • +
    • warn if a parameter is not prefixed by any of '$%@' + (good practice).
    • +
    • the available prefixes help deal with interactions with other + directives such as Define.
    • +
    • tip: it may be useful to define a macro parameter with surrounding + braces, say ${foo} so that the name can appear with + surrounding characters such as bla${foo}bla.
    • +
    • warn about empty macro contents.
    • +
    • warns if sections are not properly nested within a macro. + (if it is detected so).
    • +
    • the lexical scope of macro parameters is restricted to the macro text, + it is not forwarded to includes for instance.
    • +
    • arbitrary contents in macros. +

      It means you can put perl sections or whatever you like in a macro. + No assumption is made about the lexical structure (quotes, spaces or + whatever) within the macro contents but to expect a set of + backslash-continued independent lines.

    • +
    + +

    Use of a macro:

    +
      +
    • number of arguments must match the definition.
    • +
    • all occurences of macro parameters are substituted by their values.
    • +
    • in case of conflicts, the longest parameter name is chosen.
    • +
    • macro expansion recursion is detected and stopped (error).
    • +
    • warn about empty arguments when used.
    • +
    • on errors, try to describe precisely where the error occured.
    • +
    • $ and %-prefixed parameters are not + escaped.
    • +
    • @-prefixed parameters are escaped in quotes.
    • +
    + +

    Removal of a macro definition:

    +
      +
    • the macro must be already defined.
    • +
    + +
    +<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>
    +  order deny,allow
    +  deny from all
    +  allow from 10.2.16.0/24
    +</Macro>
    +
    +<Macro RestrictedAccessPolicy $ipnumbers>
    +   order deny,allow
    +   deny from all
    +   allow from $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 than 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:

    + +
    +order deny,allow
    +deny from all
    +allow from 10.2.16.0/24
    +...
    +order deny,allow
    +deny from all
    +allow from 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 00000000..e43542d4 --- /dev/null +++ b/docs/manual/mod/mod_macro.html.fr @@ -0,0 +1,238 @@ + + + +mod_macro - Serveur Apache HTTP + + + + + + + + +
    <-
    + +
    +

    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
    Compatibilit:Disponible partir de la version 2.4.5 du serveur HTTP +Apache
    +

    Sommaire

    + + +

    Ce module permet de dfinir et d'utiliser des macros dans les fichiers + de configuration Apache. Ces macros peuvent avoir des paramtres qui sont + expanss l'utilisation (les paramtres sont remplacs par la valeur + passe en argument), et le rsultat de la substitution est trait + normalement.

    +
    +

    Directives

    + +

    Sujets

    +
    +
    top
    +
    +

    Caractristiques

    + +

    Dfinition d'une macro :

    +
      +
    • dans une section <Macro> au style conforme la + syntaxe des fichiers de configuration Apache.
    • +
    • l'utilisateur choisit le nom de la macro et de ses paramtres.
    • +
    • les noms de macro sont insensibles la casse, comme les directives Apache.
    • +
    • les noms de paramtres sont par contre sensibles la casse.
    • +
    • les paramtres d'une macro doivent avoir des noms distincts.
    • +
    • il y a une erreur si un paramtre a un nom vide.
    • +
    • la redfinition d'une macro gnre un avertissement.
    • +
    • des dfinitions de macros peuvent tre imbriques les unes dans les autres... (mais dans quel but ?)
    • +
    • les paramtres inutiliss gnrent un avertissement.
    • +
    • les noms de paramtre en prfixe les uns des autres gnrent un avertissement.
    • +
    • les noms de paramtre non prfixs par un des caractres '$%@' gnrent un + avertissement pour encourager cette bonne pratique.
    • +
    • les diffrents prfixes proposs permettent de grer les interactions + avec d'autres directives comme Define.
    • +
    • un conseil : il peut tre utile d'ajouter des accolades autour du nom d'un + paramtre, par exemple ${foo}, de manire ce que le + paramtre puisse tre utilis entour de caractres, + par exemple bla${foo}bla.
    • +
    • gnre un avertissement si le contenu de la macro est vide.
    • +
    • gnre un avertissement si le systme dtecte que les sections l'intrieur + d'une macro ne sont pas correctement imbriques.
    • +
    • la porte lexicale des paramtres d'une macro est restreinte au texte + de la macro elle-mme... en particulier elle n'est pas propage aux inclusions.
    • +
    • il n'y a pas de contrainte sur le contenu d'une macro. +

      Cela signifie que vous pouvez mettre une section perl ou n'importe + quoi d'autre dans une macro. Il n'y a pas d'autre contrainte sur la + structure lexicale et syntaxique de la macro (guillemets, espaces...) + que d'attendre une squence de ligne avec ventuellement des + continuations.

    • +
    + +

    Utilisation d'une macro:

    +
      +
    • le nombre d'arguments doit tre cohrent avec la dfinition.
    • +
    • toutes les occurences des paramtres sont substitues par leur valeur.
    • +
    • en cas de conflit, le nom le plus long est choisi.
    • +
    • une rcursion dans l'expansion d'une macro est dtecte et interrompue avec envoi d'un message d'erreur.
    • +
    • si un argument vide est dtect, un avertissement est gnr.
    • +
    • le systme s'efforce de gnrer une description prcise de la localisation des erreurs.
    • +
    • les valeurs des paramtres prfixes par $ et % ne sont pas chappes.
    • +
    • les valeurs des paramtres prfixes par @ sont chappes par des guillemets.
    • +
    + +

    Suppression de la dfinition d'une macro :

    +
      +
    • la macro supprime doit avoir t dfinie auparavant.
    • +
    + +
    +<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: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>
    +  order deny,allow
    +  deny from all
    +  allow from 10.2.16.0/24
    +</Macro>
    +
    +<Macro RestrictedAccessPolicy $ipnumbers>
    +   order deny,allow
    +   deny from all
    +   allow from $ipnumbers
    +</Macro>
    +    
    + + +
    +
    top
    +

    undefMacro Directive

    + + + + + + +
    Description:Undefine a macro
    Syntaxe:UndefMacro name
    Contexte:configuration du serveur, serveur virtuel, rpertoire
    Statut:Base
    Module:mod_macro

    La documentation de cette directive + n'a pas encore t traduite. Veuillez vous reporter la version + en langue anglaise.

    +
    top
    +

    Use Directive

    + + + + + + +
    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 :

    + +
    +order deny,allow
    +deny from all
    +allow from 10.2.16.0/24
    +...
    +order deny,allow
    +deny from all
    +allow from 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_mime.html b/docs/manual/mod/mod_mime.html index 942dc58a..db18e2fe 100644 --- a/docs/manual/mod/mod_mime.html +++ b/docs/manual/mod/mod_mime.html @@ -4,6 +4,10 @@ URI: mod_mime.html.en 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 ace84c1f..a394b122 100644 --- a/docs/manual/mod/mod_mime.html.en +++ b/docs/manual/mod/mod_mime.html.en @@ -25,6 +25,7 @@

    Apache Module mod_mime

    Available Languages:  en  | + fr  |  ja 

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_mime

    +
    +

    Langues Disponibles:  en  | + fr  | + ja 

    +
    +
    Description:Associates the requested filename's extensions @@ -1045,6 +1046,7 @@ extensions
    + + +
    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
    +

    AddCharset Directive

    + + + + + + + +
    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
    +

    AddEncoding Directive

    + + + + + + + +
    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
    +

    AddHandler Directive

    + + + + + + + +
    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
    +

    AddInputFilter Directive

    + + + + + + + +
    Description:Associe les extensions de noms de fichiers donnes 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 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.

    + + +

    Voir aussi

    + +
    +
    top
    +

    AddLanguage Directive

    + + + + + + + +
    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
    +

    AddOutputFilter Directive

    + + + + + + + +
    Description:Associe les extensions de noms de fichiers donns 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
    +

    AddType Directive

    + + + + + + + +
    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.

    + + +

    Voir aussi

    + +
    +
    top
    +

    DefaultLanguage Directive

    + + + + + + + +
    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
    +

    ModMimeUsePathInfo Directive

    + + + + + + + +
    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
    +

    MultiviewsMatch Directive

    + + + + + + + + +
    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
    +

    RemoveCharset Directive

    + + + + + + + +
    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
    +

    RemoveEncoding Directive

    + + + + + + + +
    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
    +

    RemoveHandler Directive

    + + + + + + + +
    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
    +

    RemoveInputFilter Directive

    + + + + + + + +
    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
    +

    RemoveLanguage Directive

    + + + + + + + +
    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
    +

    RemoveOutputFilter Directive

    + + + + + + + +
    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
    +

    RemoveType Directive

    + + + + + + + +
    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
    +

    TypesConfig Directive

    + + + + + + + +
    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 ef22bfbd..7bcacff2 100644 --- a/docs/manual/mod/mod_mime.html.ja.utf8 +++ b/docs/manual/mod/mod_mime.html.ja.utf8 @@ -25,6 +25,7 @@

    Apache モジュール mod_mime

    翻訳済み言語:  en  | + fr  |  ja 

    この日本語訳はすでに古くなっている @@ -979,6 +980,7 @@

    翻訳済み言語:  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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_mime_magic

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    + + + +
    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
    +

    MimeMagicFile Directive

    + + + + + + +
    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_proxy.html.en b/docs/manual/mod/mod_proxy.html.en index efb7caca..4e6d6cd6 100644 --- a/docs/manual/mod/mod_proxy.html.en +++ b/docs/manual/mod/mod_proxy.html.en @@ -86,6 +86,7 @@

    Directives

    +
    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.5.0 + 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

    @@ -509,6 +530,11 @@ ProxyPass /examples http://backend.example.com/examples timeout=10

    The balancerurl is only needed when not in <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
    @@ -845,11 +871,14 @@ proxied 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+

    + 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.

    @@ -924,6 +953,9 @@ through a local virtual path; url is a partial URL for the remote server and cannot include a query string.

    +
    Note: This directive cannot be used within a + <Directory> context.
    +
    The ProxyRequests directive should usually be set off when using ProxyPass.
    @@ -1203,7 +1235,7 @@ ProxyPass /mirror/foo http://backend.example.com

    If the Proxy directive scheme starts with the - balancer:// (eg: balancer://cluster/, + 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 @@ -1252,7 +1284,7 @@ ProxyPass /mirror/foo http://backend.example.com scolonpathdelim Off If set to On the semi-colon character ';' will be - used as an additional sticky session path deliminator/separator. This + 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 @@ -1267,6 +1299,13 @@ ProxyPass /mirror/foo http://backend.example.com 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. + failontimeout + Off + If 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. @@ -1300,10 +1339,10 @@ ProxyPass /mirror/foo http://backend.example.com 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 + 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 + BalancerMember ajp://1.2.3.6:8009 loadfactor=5 </Proxy> @@ -1311,12 +1350,12 @@ ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover

    Setting up a hot-standby, that will only be used if no other members are available

    -ProxyPass / balancer://hotcluster/ 
    +ProxyPass / balancer://hotcluster/
     <Proxy balancer://hotcluster>
    -    BalancerMember ajp://1.2.3.4:8009/ loadfactor=1
    -    BalancerMember ajp://1.2.3.5:8009/ loadfactor=2
    +    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
    +    BalancerMember ajp://1.2.3.6:8009 status=+H
         ProxySet lbmethod=bytraffic
     </Proxy>
         
    @@ -1357,6 +1396,27 @@ ProxyPass / balancer://hotcluster/ [P] flag.

    +
    +
    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.5.0 and later. + 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

    @@ -1402,6 +1462,9 @@ ProxyPass / balancer://hotcluster/ 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

    @@ -1732,8 +1795,8 @@ expressions
     <Proxy balancer://hotcluster>
    -    BalancerMember http://www2.example.com:8080/ loadfactor=1
    -    BalancerMember http://www3.example.com:8080/ loadfactor=2
    +    BalancerMember http://www2.example.com:8080 loadfactor=1
    +    BalancerMember http://www3.example.com:8080 loadfactor=2
         ProxySet lbmethod=bytraffic
     </Proxy>
           
    diff --git a/docs/manual/mod/mod_proxy.html.fr b/docs/manual/mod/mod_proxy.html.fr index 44115926..223ea443 100644 --- a/docs/manual/mod/mod_proxy.html.fr +++ b/docs/manual/mod/mod_proxy.html.fr @@ -93,6 +93,7 @@

    Directives

    +
    top
    +

    BalancerInherit Directive

    + + + + + + + + +
    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.5.0 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

    BalancerMember Directive

    @@ -565,6 +592,11 @@ charge 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
    @@ -942,8 +974,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 @@ -1030,6 +1065,9 @@ 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 ne peut pas tre + utilise dans un contexte de niveau rpertoire.
    +
    En gnral, la directive ProxyRequests doit tre dfinie off lorsqu'on utilise la directive ProxyPass.
    @@ -1344,7 +1382,7 @@ ProxyPass /mirror/foo http://backend.example.com

    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 @@ -1426,7 +1464,15 @@ ProxyPass /mirror/foo http://backend.example.com 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 @@ -1464,10 +1510,10 @@ ProxyPass /mirror/foo http://backend.example.com 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 + 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 + BalancerMember ajp://1.2.3.6:8009 loadfactor=5 </Proxy> @@ -1477,10 +1523,10 @@ ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover

     ProxyPass / balancer://hotcluster/ 
     <Proxy balancer://hotcluster>
    -    BalancerMember ajp://1.2.3.4:8009/ loadfactor=1
    -    BalancerMember ajp://1.2.3.5:8009/ loadfactor=2
    +    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
    +    BalancerMember ajp://1.2.3.6:8009 status=+H
         ProxySet lbmethod=bytraffic
     </Proxy>
         
    @@ -1529,6 +1575,31 @@ ProxyPass / balancer://hotcluster/ [P].

    +
    +
    top
    +

    ProxyPassInherit Directive

    + + + + + + + + +
    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.5.0 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

    ProxyPassInterpolateEnv Directive

    @@ -1581,6 +1652,9 @@ 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

    @@ -1949,8 +2023,8 @@ du serveur HTTP Apache.
     <Proxy balancer://hotcluster>
    -    BalancerMember http://www2.example.com:8080/ loadfactor=1
    -    BalancerMember http://www3.example.com:8080/ loadfactor=2
    +    BalancerMember http://www2.example.com:8080 loadfactor=1
    +    BalancerMember http://www3.example.com:8080 loadfactor=2
         ProxySet lbmethod=bytraffic
     </Proxy>
           
    diff --git a/docs/manual/mod/mod_proxy.html.ja.utf8 b/docs/manual/mod/mod_proxy.html.ja.utf8 index b69b8cc1..2e21004b 100644 --- a/docs/manual/mod/mod_proxy.html.ja.utf8 +++ b/docs/manual/mod/mod_proxy.html.ja.utf8 @@ -71,6 +71,7 @@

    ディレクティブ

    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.5.0 + and later.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    BalancerMember ディレクティブ

    @@ -900,6 +916,20 @@
    top
    +
    説明:Add a member to a load balancing group
    + + + + + + + +
    説明: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.5.0 and later. + and later.

    このディレクティブの解説文書は + まだ翻訳されていません。英語版をご覧ください。 +

    +
    top

    ProxyPassInterpolateEnv ディレクティブ

    diff --git a/docs/manual/mod/mod_proxy_balancer.html.en b/docs/manual/mod/mod_proxy_balancer.html.en index d2d837d3..abbaee50 100644 --- a/docs/manual/mod/mod_proxy_balancer.html.en +++ b/docs/manual/mod/mod_proxy_balancer.html.en @@ -111,12 +111,12 @@

    -<Proxy balancer://mycluster/>
    -    BalancerMember http://192.168.1.50:80/
    -    BalancerMember http://192.168.1.51:80/
    +<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/
    +ProxyPass /test balancer://mycluster
    +ProxyPassReverse /test balancer://mycluster
         
    @@ -127,13 +127,13 @@ 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
    +<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/
    +ProxyPass /test balancer://mycluster
    +ProxyPassReverse /test balancer://mycluster
         
    top
    @@ -161,7 +161,7 @@ ProxyPassReverse /test balancer://mycluster/
    BALANCER_NAME

    This is assigned the name of the balancer used for the current - request. The value is something like balancer://foo/.

    + request. The value is something like balancer://foo.

    @@ -271,10 +271,10 @@ ProxyPassReverse /test balancer://mycluster/ 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
    +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
    +    BalancerMember http://192.168.1.50:80 route=node1
    +    BalancerMember http://192.168.1.51:80 route=node2
     </Proxy>
         
    @@ -284,7 +284,7 @@ ProxyPass /test balancer://mycluster/ stickysession=JSESSIONID|jsessionid scolon

    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.html.fr b/docs/manual/mod/mod_proxy_balancer.html.fr index 2ba449ce..b6673e34 100644 --- a/docs/manual/mod/mod_proxy_balancer.html.fr +++ b/docs/manual/mod/mod_proxy_balancer.html.fr @@ -127,12 +127,12 @@ la r

    -<Proxy balancer://mycluster/>
    -    BalancerMember http://192.168.1.50:80/
    -    BalancerMember http://192.168.1.51:80/
    +<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/
    +ProxyPass /test balancer://mycluster
    +ProxyPassReverse /test balancer://mycluster
         
    @@ -145,13 +145,13 @@ 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
    +<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/
    +ProxyPass /test balancer://mycluster
    +ProxyPassReverse /test balancer://mycluster
         
    @@ -306,10 +306,10 @@ ProxyPassReverse /test balancer://mycluster/ spars par une barre verticale (|) comme dans l'exemple suivant :

    -ProxyPass /test balancer://mycluster/ stickysession=JSESSIONID|jsessionid scolonpathdelim=On
    +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
    +    BalancerMember http://192.168.1.50:80 route=node1
    +    BalancerMember http://192.168.1.51:80 route=node2
     </Proxy>
         
    diff --git a/docs/manual/mod/mod_proxy_fcgi.html.en b/docs/manual/mod/mod_proxy_fcgi.html.en index 7ebe956e..7d453bc1 100644 --- a/docs/manual/mod/mod_proxy_fcgi.html.en +++ b/docs/manual/mod/mod_proxy_fcgi.html.en @@ -102,8 +102,8 @@

    Balanced gateway to multiple application instances

     ProxyPass /myapp/ balancer://myappcluster/
     <Proxy balancer://myappcluster/>
    -    BalancerMember fcgi://localhost:4000/
    -    BalancerMember fcgi://localhost:4001/
    +    BalancerMember fcgi://localhost:4000
    +    BalancerMember fcgi://localhost:4001
     </Proxy>
         
    diff --git a/docs/manual/mod/mod_proxy_fcgi.html.fr b/docs/manual/mod/mod_proxy_fcgi.html.fr index 4e3962cc..58741c09 100644 --- a/docs/manual/mod/mod_proxy_fcgi.html.fr +++ b/docs/manual/mod/mod_proxy_fcgi.html.fr @@ -107,8 +107,8 @@ instances de l'application
     ProxyPass /myapp/ balancer://myappcluster/
     <Proxy balancer://myappcluster/>
    -    BalancerMember fcgi://localhost:4000/
    -    BalancerMember fcgi://localhost:4001/
    +    BalancerMember fcgi://localhost:4000
    +    BalancerMember fcgi://localhost:4001
     </Proxy>
         
    diff --git a/docs/manual/mod/mod_proxy_html.html.fr b/docs/manual/mod/mod_proxy_html.html.fr index aa13d58a..9b8a3cf0 100644 --- a/docs/manual/mod/mod_proxy_html.html.fr +++ b/docs/manual/mod/mod_proxy_html.html.fr @@ -27,8 +27,6 @@

    Langues Disponibles:  en  |  fr 

    -
    Cette traduction peut tre prime. Vrifiez la version - anglaise pour les changements rcents.
    説明:Enable Environment Variable interpolation in Reverse Proxy configurations
    @@ -94,13 +92,13 @@ tampon des scripts en ligne et des feuilles de style. Disponible en tant que module tiers dans les versions 2.x antrieures.
    Description:Rcrit les liens HTML afin de s'assurer qu'ils soient bien adressables depuis les rseaux des clients dans un contexte de mandataire.

    Pour pouvoir interprter du contenu non HTML (feuilles de style et -scripts), mod_proxy_html doit le lire et le mmoriser en entier dans un +scripts inclus 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 de nombreuses +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 @@ -173,6 +171,7 @@ Debug.

    + @@ -205,11 +204,14 @@ Disponible en tant que module tiers dans les versions 2.x ant

    Cette directive permet de spcifier un ou plusieurs attributs traiter comme des vnements de type scripting et de leur appliquer les rgles -ProxyHTMLURLMap de manire approprie. Vous +ProxyHTMLURLMap o l'on souhaite les activer. Vous pouvez spcifier un nombre quelconque d'attributs dans une ou plusieurs directives ProxyHTMLEvents.

    -

    La configuration par dfaut dfinit les vnements selon les standards -HTML 4 et XHTML 1.

    +

    Le fonctionnement normal est de positionner ce paramtre de manire globale. +Si vous positionnez ProxyHTMLEvents dans un contexte qui en crase un autre, il +vous faudra prciser un jeu de paramtres complet dans chaque contexte.

    +

    Une configuration par dfaut est fournie dans proxy-html.conf, +qui dfinit les vnements selon les standards HTML 4 et XHTML 1.

    top
    @@ -218,6 +220,7 @@ HTML 4 et XHTML 1.

    + @@ -229,11 +232,18 @@ sont r 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 et les scripts inclus ou les feuilles de style sont galement +scripting (tels que dfinis par la directive ProxyHTMLEvents) +et les scripts inclus ou les feuilles de style sont galement 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.

    +

    +Il convient galement de considrer avec attention les motifs de correspondance, +car le moteur qui les interprte ne reconnat pas forcment les URL dans des scripts +ou feuilles de styles. En particulier, la correction sur des correspondances de +/ tablit un risque important de faux positifs. +

    top
    @@ -267,6 +277,7 @@ d'arri + @@ -300,8 +311,11 @@ d'URL doivent ProxyHTMLURLMap. Vous devez dfinir une directive ProxyHTMLLinks pour chaque lment, mais chacune d'entre elles peut spcifier un nombre quelconque d'attributs

    -

    La configuration par dfaut dfinit les liens HTML selon les standards -HTML 4 et XHTML 1.

    +

    Le fonctionnement normal est de positionner ce paramtre de manire globale. +Si vous positionnez ProxyHTMLLinks dans un contexte qui en crase un autre, il +vous faudra prciser un jeu de paramtres complet dans chaque contexte.

    +

    Une configuration par dfaut est fournie dans proxy-html.conf, +qui dfinit les vnements selon les standards HTML 4 et XHTML 1.

    top
    @@ -310,6 +324,7 @@ HTML 4 et XHTML 1.

    + @@ -350,6 +365,7 @@ pr
    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
    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
    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
    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
    + @@ -381,7 +397,8 @@ Disponible en tant que module tiers dans les versions 2.x ant 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.

    +modifications induites par les drapeaux ventuellement spcifis ainsi +que par la directive ProxyHTMLExtended.

    Le troisime argument optionnel permet de ffinir un des drapeaux suivants (les drapeaux sont sensibles la casse) :

    diff --git a/docs/manual/mod/mod_proxy_scgi.html.en b/docs/manual/mod/mod_proxy_scgi.html.en index 6eb93ebf..97812784 100644 --- a/docs/manual/mod/mod_proxy_scgi.html.en +++ b/docs/manual/mod/mod_proxy_scgi.html.en @@ -81,9 +81,9 @@

    Balanced gateway

     ProxyPass /scgi-bin/ balancer://somecluster/
    -<Proxy balancer://somecluster/>
    -    BalancerMember scgi://localhost:4000/
    -    BalancerMember scgi://localhost:4001/
    +<Proxy balancer://somecluster>
    +    BalancerMember scgi://localhost:4000
    +    BalancerMember scgi://localhost:4001
     </Proxy>
         
    diff --git a/docs/manual/mod/mod_proxy_scgi.html.fr b/docs/manual/mod/mod_proxy_scgi.html.fr index ff7fa464..e3151291 100644 --- a/docs/manual/mod/mod_proxy_scgi.html.fr +++ b/docs/manual/mod/mod_proxy_scgi.html.fr @@ -85,9 +85,9 @@

    Passerelle rpartition de charge

     ProxyPass /scgi-bin/ balancer://somecluster/
    -<Proxy balancer://somecluster/>
    -    BalancerMember scgi://localhost:4000/
    -    BalancerMember scgi://localhost:4001/
    +<Proxy balancer://somecluster>
    +    BalancerMember scgi://localhost:4000
    +    BalancerMember scgi://localhost:4001
     </Proxy>
         
    diff --git a/docs/manual/mod/mod_proxy_wstunnel.html b/docs/manual/mod/mod_proxy_wstunnel.html new file mode 100644 index 00000000..9eea9810 --- /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 00000000..e5dc1f69 --- /dev/null +++ b/docs/manual/mod/mod_proxy_wstunnel.html.en @@ -0,0 +1,90 @@ + + + +mod_proxy_wstunnel - Apache HTTP Server + + + + + + + + +
    <-
    + +
    +

    Apache Module mod_proxy_wstunnel

    +
    +

    Available Languages:  en 

    +
    +
    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
    + + + +
    Description:Websockets support module for +mod_proxy
    Status:Extension
    ModuleIdentifier:proxy_wstunnel_module
    SourceFile:mod_proxy_wstunnel.c
    Compatibility:Available for unix in version 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 automagically upgraded to a websocket connection:

    + +
    +Upgrade: WebSocket
    +Connection: Upgrade
    +    
    + + + +

    Proxying requests to websockets server

    +ProxyPass /ws2/  ws://echo.websocket.org/
    +ProxyPass /wss2/ wss://echo.websocket.org/
    +    
    +
    + +
    +

    Directives

    +

    This module provides no + directives.

    +

    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_reqtimeout.html b/docs/manual/mod/mod_reqtimeout.html index 08f5a21f..e44a50bb 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 719072a2..0bb30da6 100644 --- a/docs/manual/mod/mod_reqtimeout.html.en +++ b/docs/manual/mod/mod_reqtimeout.html.en @@ -24,7 +24,8 @@

    Apache Module mod_reqtimeout

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -179,7 +180,8 @@ version 2.3.14 and earlier.
    -

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_reqtimeout

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Set timeout and minimum data rate for receiving requests
    + + + +
    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
    +
    +

    Directives

    + +

    Sujets

    +
    +
    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
    +

    RequestReadTimeout Directive

    + + + + + + + + +
    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_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index d119e8d6..dbc00bfb 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -333,7 +333,11 @@ Alias /myapp /opt/myapp-1.2.3 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. + 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. +
    HTTPS
    @@ -416,7 +420,8 @@ Alias /myapp /opt/myapp-1.2.3 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 @@ -726,8 +731,8 @@ 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 contact, + 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 @@ -1192,7 +1197,7 @@ cannot use $N in the substitution string! 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 ... + .htaccess context (see also the END flag). details ... next|N diff --git a/docs/manual/mod/mod_rewrite.html.fr b/docs/manual/mod/mod_rewrite.html.fr index 9fb1c707..1c835977 100644 --- a/docs/manual/mod/mod_rewrite.html.fr +++ b/docs/manual/mod/mod_rewrite.html.fr @@ -351,7 +351,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. + 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.

    HTTPS
    @@ -445,7 +449,7 @@ la r
  • 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 @@ -776,8 +780,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 @@ -1298,7 +1303,7 @@ substitution ! 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 ... + .htaccess (voir aussi le drapeau END). dtails ... next|N diff --git a/docs/manual/mod/mod_session_cookie.html b/docs/manual/mod/mod_session_cookie.html index b0ee5a4a..f699710b 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 91d50036..837b9a84 100644 --- a/docs/manual/mod/mod_session_cookie.html.en +++ b/docs/manual/mod/mod_session_cookie.html.en @@ -24,7 +24,8 @@

    Apache Module mod_session_cookie

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -171,7 +172,8 @@ SessionCookieName2 session path=/private;domain=example.com;httponly;secure;vers
    -

    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.
    + + + + +
    <-
    + +
    +

    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
    +

    SessionCookieName Directive

    + + + + + + + +
    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
    +

    SessionCookieName2 Directive

    + + + + + + + +
    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
    +

    SessionCookieRemove Directive

    + + + + + + + +
    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_crypto.html b/docs/manual/mod/mod_session_crypto.html index b6577a8e..f0186dec 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 1b0d811e..63da4343 100644 --- a/docs/manual/mod/mod_session_crypto.html.en +++ b/docs/manual/mod/mod_session_crypto.html.en @@ -24,7 +24,8 @@

    Apache Module mod_session_crypto

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -234,7 +235,8 @@ SessionCryptoPassphrase secret
    -

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_session_crypto

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Session encryption support
    Status:Experimental
    + + + +
    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
    +

    SessionCryptoCipher Directive

    + + + + + + + + +
    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
    +

    SessionCryptoDriver Directive

    + + + + + + + + +
    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
    +

    SessionCryptoPassphrase Directive

    + + + + + + + + +
    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.

    + + +
    +
    top
    +

    SessionCryptoPassphraseFile Directive

    + + + + + + + + +
    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_dbd.html b/docs/manual/mod/mod_session_dbd.html index a01d8bfa..c4e0f5df 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 d184639b..e355ca63 100644 --- a/docs/manual/mod/mod_session_dbd.html.en +++ b/docs/manual/mod/mod_session_dbd.html.en @@ -24,7 +24,8 @@

    Apache Module mod_session_dbd

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -100,7 +101,7 @@ 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 "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 @@ -335,7 +336,8 @@ SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;v
    -

    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.
    + + + + +
    <-
    + +
    +

    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
    +

    SessionDBDCookieName Directive

    + + + + + + + +
    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
    +

    SessionDBDCookieName2 Directive

    + + + + + + + +
    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
    +

    SessionDBDCookieRemove Directive

    + + + + + + + +
    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
    +

    SessionDBDDeleteLabel Directive

    + + + + + + + +
    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
    +

    SessionDBDInsertLabel Directive

    + + + + + + + +
    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
    +

    SessionDBDPerUser Directive

    + + + + + + + +
    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
    +

    SessionDBDSelectLabel Directive

    + + + + + + + +
    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
    +

    SessionDBDUpdateLabel Directive

    + + + + + + + +
    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_setenvif.html.en b/docs/manual/mod/mod_setenvif.html.en index 2353c081..3cc91e2c 100644 --- a/docs/manual/mod/mod_setenvif.html.en +++ b/docs/manual/mod/mod_setenvif.html.en @@ -294,7 +294,7 @@ for additional examples. diff --git a/docs/manual/mod/mod_setenvif.html.tr.utf8 b/docs/manual/mod/mod_setenvif.html.tr.utf8 index ff0da44e..a486e1c5 100644 --- a/docs/manual/mod/mod_setenvif.html.tr.utf8 +++ b/docs/manual/mod/mod_setenvif.html.tr.utf8 @@ -50,10 +50,11 @@ 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
    +    
    +
  • Yönergeler

      @@ -84,18 +85,20 @@ 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
      -

      +
      +BrowserMatchNoCase Robot is_a_robot
      +SetEnvIfNoCase 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
    @@ -115,19 +118,21 @@ 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
    @@ -213,17 +218,18 @@ duyarsız eşleşmelerine bağlı olarak belirler. ü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\.example\.com dahili_site_istendi
    - :
    - SetEnvIf object_is_image xbm XBIT_PROCESSING=1
    - :
    - SetEnvIf ^TS ^[a-z] TS_VAR
    -

    +
    +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 ^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 @@ -259,9 +265,10 @@ belgesinde daha fazla örnek bulunabilir. değerlendirilirerek SetEnvIf yönergesindeki gibi ort-değişkenine uygulanır.

    -

    - SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered -

    +
    +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.

    @@ -269,9 +276,10 @@ belgesinde daha fazla örnek bulunabilir.

    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 -

    +
    +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:

      @@ -300,9 +308,10 @@ bağlı olmaksızın yapılmış tanımlara göre atar. yönergesinin eşdeğeridir. Ancak, eşleşmelerde harf büyüklüğüne duyarsızdır. Örnek:

      -

      - SetEnvIfNoCase Host Example\.Org site=example -

      +
      +SetEnvIfNoCase Host Example\.Org site=example
      +    
      +

      Burada, Host: HTTP istek başlığında Example.Org, example.org veya harf büyüklüğünce diff --git a/docs/manual/mod/mod_slotmem_plain.html b/docs/manual/mod/mod_slotmem_plain.html index 77059442..d2751d4f 100644 --- a/docs/manual/mod/mod_slotmem_plain.html +++ b/docs/manual/mod/mod_slotmem_plain.html @@ -3,3 +3,7 @@ URI: mod_slotmem_plain.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_slotmem_plain.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_slotmem_plain.html.en b/docs/manual/mod/mod_slotmem_plain.html.en index aaac2766..61a99255 100644 --- a/docs/manual/mod/mod_slotmem_plain.html.en +++ b/docs/manual/mod/mod_slotmem_plain.html.en @@ -24,7 +24,8 @@

      Apache Module mod_slotmem_plain

      -

      Available Languages:  en 

      +

      Available Languages:  en  | + fr 

      @@ -88,7 +89,8 @@
      -

      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.
      + + + + +
      <-
      + +
      +

      Module Apache mod_slotmem_plain

      +
      +

      Langues Disponibles:  en  | + fr 

      +
      +
      Description:Slot-based shared memory provider.
      Status:Extension
      + + +
      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.

      +
      + +
      +
      +

      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.html b/docs/manual/mod/mod_slotmem_shm.html index b4c9ca4b..12d155bc 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 bc327dfc..adc22f7d 100644 --- a/docs/manual/mod/mod_slotmem_shm.html.en +++ b/docs/manual/mod/mod_slotmem_shm.html.en @@ -24,7 +24,8 @@

      Apache Module mod_slotmem_shm

      -

      Available Languages:  en 

      +

      Available Languages:  en  | + fr 

      @@ -101,7 +102,8 @@
      -

      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.
      + + + + +
      <-
      + +
      +

      Module Apache mod_slotmem_shm

      +
      +

      Langues Disponibles:  en  | + fr 

      +
      +
      Description:Slot-based shared memory provider.
      Status:Extension
      + + +
      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.

      +
      + +
      +
      +

      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_so.html.tr.utf8 b/docs/manual/mod/mod_so.html.tr.utf8 index 0be2b4ac..85d50ffc 100644 --- a/docs/manual/mod/mod_so.html.tr.utf8 +++ b/docs/manual/mod/mod_so.html.tr.utf8 @@ -30,7 +30,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -146,7 +145,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
    @@ -161,7 +160,8 @@ yeniden başlatılması sırasında yüklenmesini sağlar.

    Örnek:

    -

    LoadFile libexec/libxmlparse.so

    +
    LoadFile libexec/libxmlparse.so
    +
    @@ -171,7 +171,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 @@ -183,9 +183,10 @@ ve etkin modül listesine ekler. değişkenin ismi olup modül belgelerinde Modül Betimleyici olarak 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.

    diff --git a/docs/manual/mod/mod_socache_dbm.html b/docs/manual/mod/mod_socache_dbm.html index 7f8f449b..01bfa92b 100644 --- a/docs/manual/mod/mod_socache_dbm.html +++ b/docs/manual/mod/mod_socache_dbm.html @@ -3,3 +3,7 @@ URI: mod_socache_dbm.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_socache_dbm.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_socache_dbm.html.en b/docs/manual/mod/mod_socache_dbm.html.en index ee037664..4dcb3586 100644 --- a/docs/manual/mod/mod_socache_dbm.html.en +++ b/docs/manual/mod/mod_socache_dbm.html.en @@ -24,7 +24,8 @@

    Apache Module mod_socache_dbm

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -53,7 +54,8 @@
    -

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_socache_dbm

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:DBM based shared object cache provider.
    Status:Extension
    + + +
    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.

    +
    + +
    +
    +

    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.html b/docs/manual/mod/mod_socache_dc.html index e898ee2a..56074f75 100644 --- a/docs/manual/mod/mod_socache_dc.html +++ b/docs/manual/mod/mod_socache_dc.html @@ -3,3 +3,7 @@ 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 index 901d9cbc..d5aa6b44 100644 --- a/docs/manual/mod/mod_socache_dc.html.en +++ b/docs/manual/mod/mod_socache_dc.html.en @@ -24,7 +24,8 @@

    Apache Module mod_socache_dc

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -50,7 +51,8 @@
    -

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_socache_dc

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Distcache based shared object cache provider.
    Status:Extension
    + + +
    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.

    +
    + +
    +
    +

    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.html b/docs/manual/mod/mod_socache_memcache.html index 10fd3e20..4670c895 100644 --- a/docs/manual/mod/mod_socache_memcache.html +++ b/docs/manual/mod/mod_socache_memcache.html @@ -3,3 +3,7 @@ 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 index 07c35182..52c3714b 100644 --- a/docs/manual/mod/mod_socache_memcache.html.en +++ b/docs/manual/mod/mod_socache_memcache.html.en @@ -24,7 +24,8 @@

    Apache Module mod_socache_memcache

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -61,7 +62,8 @@
    -

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_socache_memcache

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:Memcache based shared object cache provider.
    Status:Extension
    + + +
    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:123455 +

    + +

    Vous trouverez des dtails propos des autres fournisseurs de + cache d'objets partags ici. +

    + +
    +

    Directives

    +

    Ce module ne fournit aucune directive.

    +
    + +
    +
    +

    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.html b/docs/manual/mod/mod_socache_shmcb.html index 01249eb4..1fa64fc1 100644 --- a/docs/manual/mod/mod_socache_shmcb.html +++ b/docs/manual/mod/mod_socache_shmcb.html @@ -3,3 +3,7 @@ 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 index f6a67fc0..84fe46a9 100644 --- a/docs/manual/mod/mod_socache_shmcb.html.en +++ b/docs/manual/mod/mod_socache_shmcb.html.en @@ -24,7 +24,8 @@

    Apache Module mod_socache_shmcb

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -53,7 +54,8 @@
    -

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_socache_shmcb

    +
    +

    Langues Disponibles:  en  | + fr 

    +
    +
    Description:shmcb based shared object cache provider.
    Status:Extension
    + + +
    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.

    +
    + +
    +
    +

    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.html.en b/docs/manual/mod/mod_ssl.html.en index bf1d282a..7033a6e3 100644 --- a/docs/manual/mod/mod_ssl.html.en +++ b/docs/manual/mod/mod_ssl.html.en @@ -78,6 +78,7 @@ to provide the cryptography engine.

  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -175,6 +176,7 @@ compatibility variables.

    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 @@ -1098,6 +1100,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

    @@ -1419,7 +1426,7 @@ SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/

    top

    SSLProxyCheckPeerCN Directive

    - @@ -1428,10 +1435,16 @@ 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.

    +

    +In 2.4.5 and later, SSLProxyCheckPeerCN has been superseded by +SSLProxyCheckPeerName, and its +setting is only taken into account when +SSLProxyCheckPeerName off is specified at the same time. +

    Example

     SSLProxyCheckPeerCN on
     
    @@ -1459,6 +1472,37 @@ 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 is found in +either the subjectAltName extension or (one of) the CN attribute(s) +in the certificate's subject. If the check fails, the SSL request +is aborted and a 502 status code (Bad Gateway) is returned. +The directive supersedes SSLProxyCheckPeerCN, +which only checks for the expected host name in the first CN attribute. +

    +

    +Wildcard matching is supported in one specific flavor: subjectAltName entries +of type dNSName or CN attributes starting with *. will match +for any DNS name with the same number of labels and the same suffix +(i.e., *.example.org matches for foo.example.org, +but not for foo.bar.example.org). +

    +
    top

    SSLProxyCipherSuite Directive

    @@ -1491,7 +1535,7 @@ 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.

    +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 diff --git a/docs/manual/mod/mod_ssl.html.fr b/docs/manual/mod/mod_ssl.html.fr index 19ff54cb..fab61f1f 100644 --- a/docs/manual/mod/mod_ssl.html.fr +++ b/docs/manual/mod/mod_ssl.html.fr @@ -77,6 +77,7 @@ pour fournir le moteur de chiffrement.

  • SSLProxyCARevocationPath
  • SSLProxyCheckPeerCN
  • SSLProxyCheckPeerExpire
  • +
  • SSLProxyCheckPeerName
  • SSLProxyCipherSuite
  • SSLProxyEngine
  • SSLProxyMachineCertificateChainFile
  • @@ -225,6 +226,8 @@ The serial of the server certificate nom d'utilisateur SRP SSL_SRP_USERINFO chane informations sur l'utilisateur SRP +SSL_TLS_SNI string +Contenu de l'extension SNI TLS (si support par ClientHello)

    x509 spcifie un lment de DN X.509 parmi @@ -1253,6 +1256,12 @@ Les options disponibles sont :

    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

    @@ -1620,6 +1629,11 @@ du serveur distant doit 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, et sa dfinition +n'est prise en compte que si SSLProxyCheckPeerName off a +t spcifi. +

    Exemple

     SSLProxyCheckPeerCN on
     
    @@ -1648,6 +1662,41 @@ SSLProxyCheckPeerExpire on
    + +
    top
    +

    SSLProxyCheckPeerName Directive

    + + + + + + + + +
    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 dans +les certificats de serveur lorsque mod_ssl agit en tant que client SSL. +La vrification est concluante si le nom d'hte de l'URI de la requte +correspond soit l'extension subjectAltName, soit l'un des attributs +CN dans le sujet du certificat. Si la vrification choue, la requte +SSL est annule et un code d'erreur 502 (Bad Gateway) est renvoy. Cette +directive remplace la directive SSLProxyCheckPeerCN qui ne prenait en +compte que le premier attribut CN pour la vrification du nom d'hte. +

    +

    +La vrification du nom d'hte avec caractres gnrique est supporte de +la manire suivante : les entres subjectAltName de type dNSName ou les +attributs CN commenant par *. correspondront tout nom +DNS comportant le mme nombre d'lments et le mme suffixe (par +exemple, *.example.org correspondra +foo.example.org, mais pas +foo.bar.example.org). +

    +
    top

    SSLProxyCipherSuite Directive

    diff --git a/docs/manual/mod/mod_status.html.fr b/docs/manual/mod/mod_status.html.fr index 5a81c16a..63a8714f 100644 --- a/docs/manual/mod/mod_status.html.fr +++ b/docs/manual/mod/mod_status.html.fr @@ -94,7 +94,7 @@ du serveur

    Pour n'activer les rapports d'tat que pour les navigateurs - appartenent au domaine example.com, ajoutez ces lignes votre + appartenant au domaine example.com, ajoutez ces lignes votre fichier de configuration httpd.conf :

     <Location /etat-serveur>
    diff --git a/docs/manual/mod/mod_status.html.tr.utf8 b/docs/manual/mod/mod_status.html.tr.utf8
    index a9141540..06e661e1 100644
    --- a/docs/manual/mod/mod_status.html.tr.utf8
    +++ b/docs/manual/mod/mod_status.html.tr.utf8
    @@ -30,7 +30,6 @@
      ko  |
      tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -91,15 +90,13 @@ etkin kılınmak istenirse httpd.conf dosyasına şu satırlar eklenebilir:

    -

    - <Location /server-status>
    - - SetHandler server-status
    -
    - Require host example.com
    -
    - </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 diff --git a/docs/manual/mod/mod_suexec.html b/docs/manual/mod/mod_suexec.html index f5d06c29..7bf30c42 100644 --- a/docs/manual/mod/mod_suexec.html +++ b/docs/manual/mod/mod_suexec.html @@ -4,6 +4,10 @@ URI: mod_suexec.html.en 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 905878b3..fd2accc7 100644 --- a/docs/manual/mod/mod_suexec.html.en +++ b/docs/manual/mod/mod_suexec.html.en @@ -25,6 +25,7 @@

    Apache Module mod_suexec

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -77,6 +78,7 @@ and Group

    Available Languages:  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/mod_suexec.html.fr b/docs/manual/mod/mod_suexec.html.fr new file mode 100644 index 00000000..6bedf57a --- /dev/null +++ b/docs/manual/mod/mod_suexec.html.fr @@ -0,0 +1,114 @@ + + + +mod_suexec - Serveur Apache HTTP + + + + + + + + +
    <-
    + +
    +

    Module Apache mod_suexec

    +
    +

    Langues Disponibles:  en  | + fr  | + ja  | + ko  | + tr 

    +
    +
    Açıklama:Sunucu etkinliği ve başarımı hakkında bilgi sağlar.
    Durum:Temel
    Modül Betimleyici:status_module
    + + +
    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.

    + +

    Directives

    + +

    Voir aussi

    +
    + +
    top
    +

    SuexecUserGroup Directive

    + + + + + + +
    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
    +    
    +
    + +

    Depuis la version 2.3.9, le dmarrage va chouer 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 09f9eaf2..2c276bad 100644 --- a/docs/manual/mod/mod_suexec.html.ja.utf8 +++ b/docs/manual/mod/mod_suexec.html.ja.utf8 @@ -25,6 +25,7 @@

    Apache モジュール mod_suexec

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

    @@ -79,6 +80,7 @@

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

    diff --git a/docs/manual/mod/mod_suexec.html.ko.euc-kr b/docs/manual/mod/mod_suexec.html.ko.euc-kr index 6362d054..abb08079 100644 --- a/docs/manual/mod/mod_suexec.html.ko.euc-kr +++ b/docs/manual/mod/mod_suexec.html.ko.euc-kr @@ -25,6 +25,7 @@

    ġ mod_suexec

    :  en  | + fr  |  ja  |  ko  |  tr 

    @@ -77,6 +78,7 @@

    :  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/mod_suexec.html.tr.utf8 b/docs/manual/mod/mod_suexec.html.tr.utf8 index f98cd8f4..9df3c881 100644 --- a/docs/manual/mod/mod_suexec.html.tr.utf8 +++ b/docs/manual/mod/mod_suexec.html.tr.utf8 @@ -25,17 +25,16 @@

    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.
    - -
    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 @@ -60,17 +59,16 @@ 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.

    -

    Örnek

    - - SuexecUserGroup nobody nogroup -

    +
    +SuexecUserGroup nobody nogroup
    +    
    +

    Apache HTTP Sunucusunun 2.3.9 ve sonraki sürümlerinde, bu yönerge belirtildiği halde Suexec @@ -84,6 +82,7 @@

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/mod_unixd.html b/docs/manual/mod/mod_unixd.html index 11eeb743..991efe3a 100644 --- a/docs/manual/mod/mod_unixd.html +++ b/docs/manual/mod/mod_unixd.html @@ -4,6 +4,10 @@ URI: mod_unixd.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_unixd.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_unixd.html.tr.utf8 Content-Language: tr Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_unixd.html.en b/docs/manual/mod/mod_unixd.html.en index 1af9b6c6..a6afe58d 100644 --- a/docs/manual/mod/mod_unixd.html.en +++ b/docs/manual/mod/mod_unixd.html.en @@ -25,6 +25,7 @@

    Apache Module mod_unixd

    Available Languages:  en  | + fr  |  tr 

    @@ -182,6 +183,7 @@ 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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_unixd

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    +
    Description:Basic (required) security for Unix-family platforms.
    + + +
    Description:Scurit de base (ncessaire) pour les plates-formes de la +famille Unix.
    Statut:Base
    IdentificateurdeModule:unixd_module
    FichierSource:mod_unixd.c
    +
    +

    Directives

    + +

    Voir aussi

    +
    + +
    top
    +

    ChrootDir Directive

    + + + + + + + + +
    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
    +

    Group Directive

    + + + + + + + +
    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
    +

    Suexec Directive

    + + + + + + + + +
    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
    Compatibilit:Disponible depuis la version 2.3.9 d'Apache httpd
    +

    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
    +

    User Directive

    + + + + + + + +
    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 37addfc5..8fcebb5d 100644 --- a/docs/manual/mod/mod_unixd.html.tr.utf8 +++ b/docs/manual/mod/mod_unixd.html.tr.utf8 @@ -25,11 +25,13 @@

    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

      @@ -75,7 +77,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 @@ -92,9 +93,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 @@ -142,8 +142,6 @@ 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 @@ -187,6 +185,7 @@

    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.
    + + + + +
    <-
    + +
    +

    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
    +

    UserDir Directive

    + + + + + + +
    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 47f0d4c6..3d1c8ed1 100644 --- a/docs/manual/mod/mod_userdir.html.ja.utf8 +++ b/docs/manual/mod/mod_userdir.html.ja.utf8 @@ -25,6 +25,7 @@

    Apache モジュール mod_userdir

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

    @@ -185,6 +186,7 @@ Apache はリダイレクトが成功するかどうかを決めることはで

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

    diff --git a/docs/manual/mod/mod_userdir.html.ko.euc-kr b/docs/manual/mod/mod_userdir.html.ko.euc-kr index f0024f7a..18d99e2e 100644 --- a/docs/manual/mod/mod_userdir.html.ko.euc-kr +++ b/docs/manual/mod/mod_userdir.html.ko.euc-kr @@ -25,6 +25,7 @@

    ġ mod_userdir

    :  en  | + fr  |  ja  |  ko  |  tr 

    @@ -157,6 +158,7 @@ http://www.foo.com/bob/one/two.html

    :  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/mod_userdir.html.tr.utf8 b/docs/manual/mod/mod_userdir.html.tr.utf8 index a8ebf5bc..79bbd949 100644 --- a/docs/manual/mod/mod_userdir.html.tr.utf8 +++ b/docs/manual/mod/mod_userdir.html.tr.utf8 @@ -25,11 +25,11 @@

    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.
    @@ -131,23 +131,26 @@

    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://example.com/ -

    +
    +Userdir public_html /usr/siteler http://example.com/
    +    
    +

    Bu örneğe göre, http://example.com/~ali/bir/iki.html şeklinde bir istek alındığında sunucu önce @@ -182,6 +185,7 @@

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/mod_usertrack.html b/docs/manual/mod/mod_usertrack.html index 63ee8b40..abed042f 100644 --- a/docs/manual/mod/mod_usertrack.html +++ b/docs/manual/mod/mod_usertrack.html @@ -3,3 +3,7 @@ URI: mod_usertrack.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mod_usertrack.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mod_usertrack.html.en b/docs/manual/mod/mod_usertrack.html.en index 18e35154..9f4922f2 100644 --- a/docs/manual/mod/mod_usertrack.html.en +++ b/docs/manual/mod/mod_usertrack.html.en @@ -24,7 +24,8 @@

    Apache Module mod_usertrack

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    Açıklama:Kullanıcılara özel dizinler
    Durum:Temel
    Modül Betimleyici:userdir_module
    -
    Description: Clickstream logging of user activity on a site @@ -221,7 +222,8 @@ CustomLog logs/clickstream.log usertrack
    -

    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.
    + + + + +
    <-
    + +
    +

    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
    +

    CookieDomain Directive

    + + + + + + + +
    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
    +

    CookieExpires Directive

    + + + + + + + +
    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
    +

    CookieName Directive

    + + + + + + + + +
    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
    +

    CookieStyle Directive

    + + + + + + + + +
    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
    +

    CookieTracking Directive

    + + + + + + + + +
    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_vhost_alias.html b/docs/manual/mod/mod_vhost_alias.html index 62ad4bdf..de993fc2 100644 --- a/docs/manual/mod/mod_vhost_alias.html +++ b/docs/manual/mod/mod_vhost_alias.html @@ -4,6 +4,10 @@ URI: mod_vhost_alias.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: mod_vhost_alias.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: mod_vhost_alias.html.tr.utf8 Content-Language: tr Content-type: text/html; charset=UTF-8 diff --git a/docs/manual/mod/mod_vhost_alias.html.en b/docs/manual/mod/mod_vhost_alias.html.en index 9c6ef444..4a251323 100644 --- a/docs/manual/mod/mod_vhost_alias.html.en +++ b/docs/manual/mod/mod_vhost_alias.html.en @@ -25,6 +25,7 @@

    Apache Module mod_vhost_alias

    Available Languages:  en  | + fr  |  tr 

    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.
    + + + + +
    <-
    + +
    +

    Module Apache mod_vhost_alias

    +
    +

    Langues Disponibles:  en  | + fr  | + tr 

    +
    +
    Description:Provides for dynamically configured mass virtual @@ -345,6 +346,7 @@ a given virtual host
    + + +
    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
    +

    VirtualDocumentRoot Directive

    + + + + + + + +
    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
    +

    VirtualDocumentRootIP Directive

    + + + + + + + +
    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
    +

    VirtualScriptAlias Directive

    + + + + + + + +
    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
    +

    VirtualScriptAliasIP Directive

    + + + + + + + +
    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 280e811d..266d0ea1 100644 --- a/docs/manual/mod/mod_vhost_alias.html.tr.utf8 +++ b/docs/manual/mod/mod_vhost_alias.html.tr.utf8 @@ -25,9 +25,9 @@

    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.
    @@ -48,10 +48,11 @@ 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/
    +      
    +

    Yönergeler

    @@ -141,10 +142,11 @@ 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://example.com/dizin/dosya.html için yapılan bir istek /usr/local/apache/sankonlar/example.com/dizin/dosya.html @@ -154,10 +156,11 @@ Sanal Barındırma 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.example.com/dizin/dosya.html için yapılan bir istek @@ -166,9 +169,10 @@ Sanal Barındırma

    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/example.com/n/a/l/filan/dizin/dosya.html @@ -176,23 +180,46 @@ Sanal Barındırma

    Şö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/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.example.com/dizin/dosya.html için yapılan bir istek eğer falan.filan.example.com’un IP adresi @@ -208,9 +235,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.example.com/dizin/dosya.html için yapılan bir istek @@ -242,6 +270,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
    @@ -303,6 +339,7 @@ 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.
    + + + +
    <-
    +

    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 60ec6285..12bc1a8e 100644 --- a/docs/manual/mod/module-dict.html.ja.utf8 +++ b/docs/manual/mod/module-dict.html.ja.utf8 @@ -22,6 +22,7 @@ Apache > HTTP サーバ > ドキュメンテーション > バージョン 2.4

    Apache モジュールの解説で使用する用語

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

    @@ -115,6 +116,7 @@

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

    diff --git a/docs/manual/mod/module-dict.html.ko.euc-kr b/docs/manual/mod/module-dict.html.ko.euc-kr index 8e85bbc7..3aa7d92f 100644 --- a/docs/manual/mod/module-dict.html.ko.euc-kr +++ b/docs/manual/mod/module-dict.html.ko.euc-kr @@ -22,6 +22,7 @@ Apache > HTTP Server > Documentation > Version 2.4

    ϱ

    :  en  | + fr  |  ja  |  ko  |  tr 

    @@ -105,6 +106,7 @@

    :  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/module-dict.html.tr.utf8 b/docs/manual/mod/module-dict.html.tr.utf8 index 4aef2ee7..3251d409 100644 --- a/docs/manual/mod/module-dict.html.tr.utf8 +++ b/docs/manual/mod/module-dict.html.tr.utf8 @@ -22,6 +22,7 @@ Apache > HTTP Sunucusu > Belgeleme > Sürüm 2.4

    Modülleri Tanımlamakta Kullanılan Terimler

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    @@ -85,6 +86,7 @@

    Mevcut Diller:  en  | + fr  |  ja  |  ko  |  tr 

    diff --git a/docs/manual/mod/mpm_common.html.en b/docs/manual/mod/mpm_common.html.en index 191eeeda..f5520f3a 100644 --- a/docs/manual/mod/mpm_common.html.en +++ b/docs/manual/mod/mpm_common.html.en @@ -674,6 +674,7 @@ per child process

    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 diff --git a/docs/manual/mod/mpm_common.html.fr b/docs/manual/mod/mpm_common.html.fr index 6708f746..8f529898 100644 --- a/docs/manual/mod/mpm_common.html.fr +++ b/docs/manual/mod/mpm_common.html.fr @@ -550,7 +550,7 @@ la coordination des processus enfants

    Une mmoire partage sous forme de fichier est utile pour les - applications tierces qui ncessitent un accs direct au tableau de + applications tierses qui ncessitent un accs direct au tableau de bord des processus.

    Si vous utilisez un ScoreBoardFile, vous @@ -736,6 +736,7 @@ processus enfant

    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 diff --git a/docs/manual/mod/mpm_common.html.tr.utf8 b/docs/manual/mod/mpm_common.html.tr.utf8 index a4fd6a2d..cfad0937 100644 --- a/docs/manual/mod/mpm_common.html.tr.utf8 +++ b/docs/manual/mod/mpm_common.html.tr.utf8 @@ -30,7 +30,6 @@  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    Açıklama:Kitlesel sanal konakların devingen olarak yapılandırılmasını sağlar
    Durum:Eklenti
    Modül Betimleyici:vhost_alias_module
    Açıklama:Birden fazla Çok Süreçlilik Modülü (MPM) tarafından gerçeklenmiş yönergeler bütünü.
    Durum:MPM
    @@ -127,7 +126,6 @@
    Bağlam:sunucu geneli
    Durum:MPM
    Modül:event, prefork, worker
    Uyumluluk:Sürüm 2.0.49 ve sonrasında mevcuttur

    Güvenlik sebebiyle bu yönerge sadece Apache --enable-exception-hook seçeneği ile yapılandırılmışsa @@ -137,7 +135,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
    @@ -170,8 +168,7 @@ Bağlam:sunucu geneli Durum:MPM Modül:mpm_netware, mpm_winnt, mpmt_os2, perchild, prefork, worker, event -Uyumluluk:Apache HTTP Sunucusu 2.0’dan beri gerekli yönergelerden - biridir.
    protokol değiştirgesi 2.1.5 sürümünde +Uyumluluk:protokol değiştirgesi 2.1.5 sürümünde eklenmiştir.

    Listen yönergesi Apache httpd’yi sadece belli IP @@ -196,25 +193,28 @@

    Ö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 @@ -227,9 +227,10 @@ https sitesi çalıştırmak istiyorsanız bunu şöyle belirtebilirsiniz:

    -

    - Listen 192.170.2.1:8443 https -

    +
    +Listen 192.170.2.1:8443 https
    +    
    +

    Hata durumu

    Aynı IP adresi ve portun çok sayıda Listen @@ -448,9 +449,10 @@ açıklaması
  • 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, @@ -491,7 +493,7 @@ açıklaması 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:event, mpm_winnt, prefork, worker @@ -505,9 +507,10 @@ açıklaması 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.

    @@ -669,8 +672,6 @@ açıklaması Bağlam:sunucu geneli Durum:MPM Modül:event, mpm_winnt, worker -Uyumluluk:mpm_winnt için Apache HTTP Sunucusu 2.0.41 ve - sonrasında kullanılabilmektedir.

    Bu yönerge, Apache httpd sürecinin ömrü boyunca ThreadsPerChild yönergesine atanabilecek azami değeri belirler. Bu yönergeyi bir yeniden başlatma @@ -693,7 +694,8 @@ açıklaması

    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 + 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.

    diff --git a/docs/manual/mod/mpm_netware.html b/docs/manual/mod/mpm_netware.html index 4b973d16..b818fb32 100644 --- a/docs/manual/mod/mpm_netware.html +++ b/docs/manual/mod/mpm_netware.html @@ -3,3 +3,7 @@ URI: mpm_netware.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 + +URI: mpm_netware.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 diff --git a/docs/manual/mod/mpm_netware.html.en b/docs/manual/mod/mpm_netware.html.en index a4c8b44b..06ae6265 100644 --- a/docs/manual/mod/mpm_netware.html.en +++ b/docs/manual/mod/mpm_netware.html.en @@ -24,7 +24,8 @@

    Apache MPM netware

    -

    Available Languages:  en 

    +

    Available Languages:  en  | + fr 

    @@ -106,7 +107,8 @@
    -

    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.
    + + + + +
    <-
    + +
    +

    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
    +

    MaxThreads Directive

    + + + + + + + +
    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_winnt.html b/docs/manual/mod/mpm_winnt.html index 2c0ccc92..7370f15f 100644 --- a/docs/manual/mod/mpm_winnt.html +++ b/docs/manual/mod/mpm_winnt.html @@ -8,6 +8,10 @@ URI: mpm_winnt.html.en 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 9fb5215d..bf8c4c7e 100644 --- a/docs/manual/mod/mpm_winnt.html.de +++ b/docs/manual/mod/mpm_winnt.html.de @@ -26,6 +26,7 @@

    Verfgbare Sprachen:  de  |  en  | + fr  |  ja 

    Diese bersetzung ist mglicherweise @@ -65,6 +66,7 @@

    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.
    + + + + +
    <-
    + +
    +

    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 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 fd6ba696..68cf9deb 100644 --- a/docs/manual/mod/mpm_winnt.html.ja.utf8 +++ b/docs/manual/mod/mpm_winnt.html.ja.utf8 @@ -26,6 +26,7 @@

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

    この日本語訳はすでに古くなっている @@ -67,6 +68,7 @@

    翻訳済み言語:  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.
    + + + + +
    <-
    + +

    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 "+".

    + +

    Les troisime et quatrime colonnes numrent les contextes dans + lesquels la directive est applicable ainsi que 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  |  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 donnes 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 donns 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
    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 un 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
    AuthLDAPBindAuthoritativeoff|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
    AuthLDAPInitialBindPatternregex 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-fournisseursB
    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
    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]svdhE
    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
    The directory root under which cache files are +stored
    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 maximum 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
    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
    CGIMapExtension chemin CGI .extensiondhC
    Technique permettant de localiser l'interprteur des +scripts CGI
    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
    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.
    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/h +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
    GprofDir /tmp/gprof/|/tmp/gprof/%svC
    Rpertoire dans lequel crire les donnes de profiling +gmon.out.
    GracefulShutDownTimeout secondessM
    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
    Header [condition] add|append|echo|edit|edit*|merge|set|unset +en-tte [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
    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
    mulation 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 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
    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
    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
    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
    Provide a Lua function for content input filtering
    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
    Provide a Lua function for content output filtering
    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
    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.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
    <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 ?
    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 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
    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] chemin URL +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
    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 intranet clients comme 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|unset +en-tte [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 comparaisonsvdhE
    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 nom de la correspondance type de +correspondance:source de la correspondance +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 rpertoiresvB
    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 +entirement qualifi[: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 valeursvdhB
    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 nom gestionnaire|NonesvdhC
    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 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 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 flagsvE
    Option permettant de classer les algorithmes de chiffrement +du serveur par ordre de prfrence
    SSLInsecureRenegotiation drapeau 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 drapeausvE
    Active la validation OCSP de la chane de certificats du +client
    SSLOCSPOverrideResponder drapeausvE
    Force l'utilisation de l'URI du rpondeur par dfaut pour +la validation 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
    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 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 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
    SSLSRPUnknownUserSeed secret-stringsvE
    Source d'ala pour utilisateur SRP inconnu
    SSLSRPVerifierFile file-pathsvE
    Chemin du fichier de vrification SRP
    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
    SSLStaplingForceURL urisvE
    Override the OCSP responder URI specified in the certificate's AIA extension
    SSLStaplingResponderTimeout seconds 10 svE
    Timeout for OCSP stapling queries
    SSLStaplingResponseMaxAge seconds -1 svE
    Maximum allowable age for OCSP stapling responses
    SSLStaplingResponseTimeSkew seconds 300 svE
    Maximum allowable time skew for OCSP stapling response validation
    SSLStaplingReturnResponderErrors on|off on svE
    Pass stapling related OCSP errors on to client
    SSLStaplingStandardCacheTimeout seconds 3600 svE
    Number of seconds before expiring responses in the OCSP stapling 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
    Enable stapling of OCSP responses in the TLS handshake
    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
    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 namesvdB
    Undefine a 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 630cff46..0f1cce7d 100644 --- a/docs/manual/mod/quickreference.html.ja.utf8 +++ b/docs/manual/mod/quickreference.html.ja.utf8 @@ -26,6 +26,7 @@

    翻訳済み言語:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -141,110 +142,113 @@ proxy AsyncRequestWorkerFactor factorsMLimit concurrent connections per process AuthBasicAuthoritative On|Off On dhB認証と承認を、より低いレベルのモジュールに移行させるかを 設定します。 -AuthBasicProvider provider-name -[provider-name] ... file dhBこの位置に対する認証プロバイダを設定します。 -AuthDBDUserPWQuery querydESQL query to look up a password for a user -AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. +AuthBasicFake off|username [password]dhBFake basic authentication using the given expressions for +username and password +AuthBasicProvider provider-name +[provider-name] ... file dhBこの位置に対する認証プロバイダを設定します。 +AuthDBDUserPWQuery querydESQL query to look up a password for a user +AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. -AuthDBMGroupFile file-pathdhESets the name of the database file containing the list +AuthDBMGroupFile file-pathdhESets the name of the database file containing the list of user groups for authorization -AuthDBMType default|SDBM|GDBM|NDBM|DB default dhEパスワードを保存するために必要なデータベースファイルの種類を +AuthDBMType default|SDBM|GDBM|NDBM|DB default dhEパスワードを保存するために必要なデータベースファイルの種類を 設定する -AuthDBMUserFile file-pathdhE認証用のユーザとパスワードのリストを保持している +AuthDBMUserFile file-pathdhE認証用のユーザとパスワードのリストを保持している データベースファイル名を設定する -AuthDigestAlgorithm MD5|MD5-sess MD5 dhESelects the algorithm used to calculate the challenge and +AuthDigestAlgorithm MD5|MD5-sess MD5 dhESelects the algorithm used to calculate the challenge and response hashes in digest authentication -AuthDigestDomain URI [URI] ...dhEURIs that are in the same protection space for digest +AuthDigestDomain URI [URI] ...dhEURIs that are in the same protection space for digest authentication -AuthDigestNonceLifetime seconds 300 dhEHow long the server nonce is valid -AuthDigestProvider provider-name -[provider-name] ... file dhESets the authentication provider(s) for this location -AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhEDetermines the quality-of-protection to use in digest +AuthDigestNonceLifetime seconds 300 dhEHow long the server nonce is valid +AuthDigestProvider provider-name +[provider-name] ... file dhESets the authentication provider(s) for this location +AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhEDetermines the quality-of-protection to use in digest authentication -AuthDigestShmemSize size 1000 sEThe amount of shared memory to allocate for keeping track +AuthDigestShmemSize size 1000 sEThe amount of shared memory to allocate for keeping track of clients -AuthFormAuthoritative On|Off On dhBSets whether authorization and authentication are passed to +AuthFormAuthoritative On|Off On dhBSets whether authorization and authentication are passed to lower level modules -AuthFormBody fieldnamedBThe name of a form field carrying the body of the request to attempt on successful login -AuthFormDisableNoStore On|Off Off dBDisable the CacheControl no-store header on the login page -AuthFormFakeBasicAuth On|Off Off dBFake a Basic Authentication header -AuthFormLocation fieldnamedBThe name of a form field carrying a URL to redirect to on successful login -AuthFormLoginRequiredLocation urldBThe URL of the page to be redirected to should login be required -AuthFormLoginSuccessLocation urldBThe URL of the page to be redirected to should login be successful -AuthFormLogoutLocation uridBThe URL to redirect to after a user has logged out -AuthFormMethod fieldnamedBThe name of a form field carrying the method of the request to attempt on successful login -AuthFormMimetype fieldnamedBThe name of a form field carrying the mimetype of the body of the request to attempt on successful login -AuthFormPassword fieldnamedBThe name of a form field carrying the login password -AuthFormProvider provider-name -[provider-name] ... file dhBSets the authentication provider(s) for this location -AuthFormSitePassphrase secretdBBypass authentication checks for high traffic sites -AuthFormSize sizedBThe largest size of the form in bytes that will be parsed for the login details -AuthFormUsername fieldnamedBThe name of a form field carrying the login username -AuthGroupFile file-pathdhB証認に使用するユーザグループの一覧が格納されている、 +AuthFormBody fieldnamedBThe name of a form field carrying the body of the request to attempt on successful login +AuthFormDisableNoStore On|Off Off dBDisable the CacheControl no-store header on the login page +AuthFormFakeBasicAuth On|Off Off dBFake a Basic Authentication header +AuthFormLocation fieldnamedBThe name of a form field carrying a URL to redirect to on successful login +AuthFormLoginRequiredLocation urldBThe URL of the page to be redirected to should login be required +AuthFormLoginSuccessLocation urldBThe URL of the page to be redirected to should login be successful +AuthFormLogoutLocation uridBThe URL to redirect to after a user has logged out +AuthFormMethod fieldnamedBThe name of a form field carrying the method of the request to attempt on successful login +AuthFormMimetype fieldnamedBThe name of a form field carrying the mimetype of the body of the request to attempt on successful login +AuthFormPassword fieldnamedBThe name of a form field carrying the login password +AuthFormProvider provider-name +[provider-name] ... file dhBSets the authentication provider(s) for this location +AuthFormSitePassphrase secretdBBypass authentication checks for high traffic sites +AuthFormSize sizedBThe largest size of the form in bytes that will be parsed for the login details +AuthFormUsername fieldnamedBThe name of a form field carrying the login username +AuthGroupFile file-pathdhB証認に使用するユーザグループの一覧が格納されている、 テキストファイルの名前を設定する -AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during +AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during authorization -AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server -AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN -AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file -AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons -AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs -AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases -AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of +AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server +AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN +AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file +AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons +AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs +AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases +AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of groups. -AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for +AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for group membership -AuthLDAPInitialBindAsUser off|on off dhEDetermines if the server does the initial DN lookup using the basic authentication users' +AuthLDAPInitialBindAsUser off|on off dhEDetermines 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 +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server +AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup -AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be +AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued. -AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user +AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user query to set the REMOTE_USER environment variable -AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER +AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER environment variable -AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches -AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per +AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches +AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per directive line, used to distinguish the members of the current group that are groups. -AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory +AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory objects that are groups during sub-group processing. -AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters -AuthMerging Off | And | Or Off dhBControls the manner in which each configuration section's +AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters +AuthMerging Off | And | Or Off dhBControls the manner in which each configuration section's authorization logic is combined with that of preceding configuration sections. -AuthName auth-domaindhBAuthorization realm for use in HTTP +AuthName auth-domaindhBAuthorization realm for use in HTTP authentication -AuthnCacheContext directory|server|custom-stringdBSpecify a context string for use in the cache key -AuthnCacheEnablesBEnable Authn caching configured anywhere -AuthnCacheProvideFor authn-provider [...]dhBSpecify which authn provider(s) to cache for -AuthnCacheSOCache provider-namesBSelect socache backend provider to use -AuthnCacheTimeout timeout (seconds)dhBSet a timeout for cache entries -<AuthnProviderAlias baseProvider Alias> -... </AuthnProviderAlias>sBEnclose a group of directives that represent an +AuthnCacheContext directory|server|custom-stringdBSpecify a context string for use in the cache key +AuthnCacheEnablesBEnable Authn caching configured anywhere +AuthnCacheProvideFor authn-provider [...]dhBSpecify which authn provider(s) to cache for +AuthnCacheSOCache provider-namesBSelect socache backend provider to use +AuthnCacheTimeout timeout (seconds)dhBSet a timeout for cache entries +<AuthnProviderAlias baseProvider Alias> +... </AuthnProviderAlias>sBEnclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias -AuthType None|Basic|Digest|FormdhBType of user authentication -AuthUserFile file-pathdhB認証に使用するユーザとパスワードの一覧が格納されている、 +AuthType None|Basic|Digest|FormdhBType of user authentication +AuthUserFile file-pathdhB認証に使用するユーザとパスワードの一覧が格納されている、 テキストファイルの名前を設定する -AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring +AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring page on successful login or logout if a Referer request header is present -AuthzDBDQuery querydESpecify the SQL Query for the required operation -AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user -AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to +AuthzDBDQuery querydESpecify the SQL Query for the required operation +AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user +AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to store list of user groups -<AuthzProviderAlias baseProvider Alias Require-Parameters> +<AuthzProviderAlias baseProvider Alias Require-Parameters> ... </AuthzProviderAlias> -sBEnclose a group of directives that represent an +sBEnclose a group of directives that represent an extension of a base authorization provider and referenced by the specified alias -AuthzSendForbiddenOnFailure On|Off Off dhBSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if +AuthzSendForbiddenOnFailure On|Off Off dhBSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if authentication succeeds but authorization fails -BalancerGrowth # 5 svENumber of additional Balancers that can be added Post-configuration +BalancerGrowth # 5 svENumber of additional Balancers that can be added Post-configuration +BalancerInherit On|Off On svEInherit ProxyPassed Balancers/Workers from the main server dEAdd a member to a load balancing group BalancerPersist On|Off Off svEAttempt to persist changes made by the Balancer Manager across restarts. BrowserMatch regex [!]env-variable[=value] @@ -288,6 +292,18 @@ authentication succeeds but authorization fails svdhEThe minimum size (in bytes) of the document to read and be cached before sending the data downstream svdhEThe minimum time (in milliseconds) that should elapse while reading before data is sent downstream CacheRoot directorysvEキャッシュファイルが保管されるルートディレクトリ +CacheSocache type[:args]svEThe directory root under which cache files are +stored +CacheSocacheMaxSize bytes 102400 svdhEThe maximum size (in bytes) of an entry to be placed in the +cache +CacheSocacheMaxTime seconds 86400 svdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheMinTime seconds 600 svdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheReadSize bytes 0 svdhEThe minimum size (in bytes) of the document to read and be cached + before sending the data downstream +CacheSocacheReadTime milliseconds 0 svdhEThe minimum time (in milliseconds) that should elapse while reading + before data is sent downstream CacheStaleOnError on|off on svdhEServe stale content in place of 5xx responses. CacheStoreExpired On|Off Off svdhEAttempt to cache responses that the server reports as expired CacheStoreNoStore On|Off Off svEno-store と指定されているレスポンスのキャッシュを試みる。 @@ -533,107 +549,115 @@ Certificate Authority or global client certificates LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesXPlug an authorization provider function into mod_authz_core -LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the access_checker phase of request processing -LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the auth_checker phase of request processing -LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the check_user_id phase of request processing -LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the fixups phase of request +LuaCodeCache stat|forever|never stat svdhXConfigure the compiled code cache. +LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the access_checker phase of request processing +LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the auth_checker phase of request processing +LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the check_user_id phase of request processing +LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the fixups phase of a request processing -LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the insert_filter phase of request processing -LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the map_to_storage phase of request processing -LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svXProvide a hook for the translate name phase of request processing -LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the type_checker phase of request processing -LuaInherit none|parent-first|parent-last parent-first svdhXControls how parent configuration sections are merged into children +LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the insert_filter phase of request processing +LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the map_to_storage phase of request processing +LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svXProvide a hook for the translate name phase of request processing +LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the type_checker phase of request processing +LuaInherit none|parent-first|parent-last parent-first svdhXControls how parent configuration sections are merged into children +LuaInputFilter filter_name /path/to/lua/script.lua function_namesXProvide a Lua function for content input filtering +LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhXMap a path to a lua handler +LuaOutputFilter filter_name /path/to/lua/script.lua function_namesXProvide a Lua function for content output filtering LuaPackageCPath /path/to/include/?.soasvdhXAdd a directory to lua's package.cpath LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn, thread -- default is once -MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once + +<Macro name [par1 .. parN]> +... </Macro>svdBDefine a configuration file macro +MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life -MaxKeepAliveRequests number 100 svC持続的な接続上で許可されるリクエストの数 -MaxMemFree KBytes 0 sMfree() が呼ばれない限り、 +MaxKeepAliveRequests number 100 svC持続的な接続上で許可されるリクエストの数 +MaxMemFree KBytes 0 sMfree() が呼ばれない限り、 主メモリアロケータが保持し続けられるメモリの最大量 -MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdCNumber of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete +MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdCNumber of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete resource -MaxRangeReversals default | unlimited | none | number-of-ranges 20 svdCNumber of range reversals (eg: 100-200,50-70) allowed before returning the complete +MaxRangeReversals default | unlimited | none | number-of-ranges 20 svdCNumber of range reversals (eg: 100-200,50-70) allowed before returning the complete resource -MaxRanges default | unlimited | none | number-of-ranges 200 svdCNumber of ranges allowed before returning the complete +MaxRanges default | unlimited | none | number-of-ranges 200 svdCNumber of ranges allowed before returning the complete resource -MaxRequestWorkers numbersMMaximum number of connections that will be processed +MaxRequestWorkers numbersMMaximum number of connections that will be processed simultaneously -MaxSpareServers number 10 sMアイドルな子サーバプロセスの最大個数 -MaxSpareThreads numbersMアイドルスレッドの最大数 -MaxThreads number 2048 sMSet the maximum number of worker threads -MetaDir directory .web svdhEName of the directory to find CERN-style meta information +MaxSpareServers number 10 sMアイドルな子サーバプロセスの最大個数 +MaxSpareThreads numbersMアイドルスレッドの最大数 +MaxThreads number 2048 sMSet the maximum number of worker threads +MetaDir directory .web svdhEName of the directory to find CERN-style meta information files -MetaFiles on|off off svdhEActivates CERN meta-file processing -MetaSuffix suffix .meta svdhEFile name suffix for the file containing CERN-style +MetaFiles on|off off svdhEActivates CERN meta-file processing +MetaSuffix suffix .meta svdhEFile name suffix for the file containing CERN-style meta information -MimeMagicFile file-pathsvEEnable MIME-type determination based on file contents +MimeMagicFile file-pathsvEEnable MIME-type determination based on file contents using the specified magic file -MinSpareServers number 5 sMアイドルな子サーバプロセスの最小個数 -MinSpareThreads numbersMリクエストに応答することのできる +MinSpareServers number 5 sMアイドルな子サーバプロセスの最小個数 +MinSpareThreads numbersMリクエストに応答することのできる アイドルスレッド数の最小数 -MMapFile file-path [file-path] ...sXMap a list of files into memory at startup time -ModemStandard V.21|V.26bis|V.32|V.92dXModem standard to simulate -ModMimeUsePathInfo On|Off Off dpath_info コンポーネントをファイル名の一部として扱うように +MMapFile file-path [file-path] ...sXMap a list of files into memory at startup time +ModemStandard V.21|V.26bis|V.32|V.92dXModem standard to simulate +ModMimeUsePathInfo On|Off Off dpath_info コンポーネントをファイル名の一部として扱うように mod_mime に通知する -MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers -[Handlers|Filters] NegotiatedOnly svdhMultiViews でのマッチングの検索に含ませる +MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers +[Handlers|Filters] NegotiatedOnly svdhMultiViews でのマッチングの検索に含ませる ファイルのタイプを指定する -Mutex mechanism [default|mutex-name] ... [OmitPID] default sCConfigures mutex mechanism and lock file directory for all +Mutex mechanism [default|mutex-name] ... [OmitPID] default sCConfigures mutex mechanism and lock file directory for all or specified mutexes -NameVirtualHost addr[:port]sC名前ベースのバーチャルホストのための IP アドレスを指定 -NoProxy host [host] ...svE直接接続する ホスト、ドメイン、ネットワーク -NWSSLTrustedCerts filename [filename] ...sBList of additional client certificates -NWSSLUpgradeable [IP-address:]portnumbersBAllows a connection to be upgraded to an SSL connection upon request -Options - [+|-]option [[+|-]option] ... All svdhCディレクトリに対して使用可能な機能を設定する - Order ordering Deny,Allow dhEデフォルトのアクセス可能な状態と、Allow と +NameVirtualHost addr[:port]sC名前ベースのバーチャルホストのための IP アドレスを指定 +NoProxy host [host] ...svE直接接続する ホスト、ドメイン、ネットワーク +NWSSLTrustedCerts filename [filename] ...sBList of additional client certificates +NWSSLUpgradeable [IP-address:]portnumbersBAllows a connection to be upgraded to an SSL connection upon request +Options + [+|-]option [[+|-]option] ... All svdhCディレクトリに対して使用可能な機能を設定する + Order ordering Deny,Allow dhEデフォルトのアクセス可能な状態と、AllowDeny が評価される順番を制御する -OutputSed sed-commanddhXSed command for filtering response content -PassEnv env-variable [env-variable] -...svdhBシェルからの環境変数を渡す -PidFile filename logs/httpd.pid sMデーモンのプロセス ID +OutputSed sed-commanddhXSed command for filtering response content +PassEnv env-variable [env-variable] +...svdhBシェルからの環境変数を渡す +PidFile filename logs/httpd.pid sMデーモンのプロセス ID をサーバが記録するためのファイル -PrivilegesMode FAST|SECURE|SELECTIVE FAST svdXTrade off processing speed and efficiency vs security against +PrivilegesMode FAST|SECURE|SELECTIVE FAST svdXTrade off processing speed and efficiency vs security against malicious privileges-aware code. -Protocol protocolsvCProtocol for a listening socket -ProtocolEcho On|Off Off svXエコーサーバの有効無効を設定します。 -<Proxy wildcard-url> ...</Proxy>svEプロキシされるリソースに適用されるコンテナ -ProxyAddHeaders Off|On On svdEAdd proxy information in X-Forwarded-* headers -ProxyBadHeader IsError|Ignore|StartBody IsError svE応答におかしなヘッダがある場合の扱い方を決める -ProxyBlock *|word|host|domain -[word|host|domain] ...svEプロキシ接続を禁止する語句、ホスト名、ドメインを指定する -ProxyDomain DomainsvEプロキシされたリクエストのデフォルトのドメイン名 -ProxyErrorOverride On|Off Off svEプロキシされたコンテンツのエラーページを上書きする -ProxyExpressDBMFile <pathname>svEPathname to DBM file. -ProxyExpressDBMFile <type>svEDBM type of file. -ProxyExpressEnable [on|off]svEEnable the module functionality. -ProxyFtpDirCharset character set ISO-8859-1 svdEDefine the character set for proxied FTP listings -ProxyFtpEscapeWildcards [on|off]svdEWhether wildcards in requested filenames are escaped when sent to the FTP server -ProxyFtpListOnWildcard [on|off]svdEWhether wildcards in requested filenames trigger a file listing -ProxyHTMLBufSize bytessvdBSets the buffer size increment for buffering inline scripts and +Protocol protocolsvCProtocol for a listening socket +ProtocolEcho On|Off Off svXエコーサーバの有効無効を設定します。 +<Proxy wildcard-url> ...</Proxy>svEプロキシされるリソースに適用されるコンテナ +ProxyAddHeaders Off|On On svdEAdd proxy information in X-Forwarded-* headers +ProxyBadHeader IsError|Ignore|StartBody IsError svE応答におかしなヘッダがある場合の扱い方を決める +ProxyBlock *|word|host|domain +[word|host|domain] ...svEプロキシ接続を禁止する語句、ホスト名、ドメインを指定する +ProxyDomain DomainsvEプロキシされたリクエストのデフォルトのドメイン名 +ProxyErrorOverride On|Off Off svEプロキシされたコンテンツのエラーページを上書きする +ProxyExpressDBMFile <pathname>svEPathname to DBM file. +ProxyExpressDBMFile <type>svEDBM type of file. +ProxyExpressEnable [on|off]svEEnable the module functionality. +ProxyFtpDirCharset character set ISO-8859-1 svdEDefine the character set for proxied FTP listings +ProxyFtpEscapeWildcards [on|off]svdEWhether wildcards in requested filenames are escaped when sent to the FTP server +ProxyFtpListOnWildcard [on|off]svdEWhether wildcards in requested filenames trigger a file listing +ProxyHTMLBufSize bytessvdBSets the buffer size increment for buffering inline scripts and stylesheets. -ProxyHTMLCharsetOut Charset | *svdBSpecify a charset for mod_proxy_html output. -ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdBSets an HTML or XHTML document type declaration. -ProxyHTMLEnable On|Off Off svdBTurns the proxy_html filter on or off. -ProxyHTMLEvents attribute [attribute ...]svdBSpecify attributes to treat as scripting events. -ProxyHTMLExtended On|Off Off svdBDetermines whether to fix links in inline scripts, stylesheets, +ProxyHTMLCharsetOut Charset | *svdBSpecify a charset for mod_proxy_html output. +ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdBSets an HTML or XHTML document type declaration. +ProxyHTMLEnable On|Off Off svdBTurns the proxy_html filter on or off. +ProxyHTMLEvents attribute [attribute ...]svdBSpecify attributes to treat as scripting events. +ProxyHTMLExtended On|Off Off svdBDetermines whether to fix links in inline scripts, stylesheets, and scripting events. -ProxyHTMLFixups [lowercase] [dospath] [reset]svdBFixes for simple HTML errors. -ProxyHTMLInterp On|Off Off svdBEnables per-request interpolation of +ProxyHTMLFixups [lowercase] [dospath] [reset]svdBFixes for simple HTML errors. +ProxyHTMLInterp On|Off Off svdBEnables per-request interpolation of ProxyHTMLURLMap rules. -ProxyHTMLLinks element attribute [attribute2 ...]svdBSpecify HTML elements that have URL attributes to be rewritten. -ProxyHTMLMeta On|Off Off svdBTurns on or off extra pre-parsing of metadata in HTML +ProxyHTMLLinks element attribute [attribute2 ...]svdBSpecify HTML elements that have URL attributes to be rewritten. +ProxyHTMLMeta On|Off Off svdBTurns on or off extra pre-parsing of metadata in HTML <head> sections. -ProxyHTMLStripComments On|Off Off svdBDetermines whether to strip HTML comments. -ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdBDefines 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 空間にマップする +ProxyHTMLStripComments On|Off Off svdBDetermines whether to strip HTML comments. +ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdBDefines 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 空間にマップする +ProxyPassInherit On|Off On svEInherit ProxyPass directives defined from the main server svdEEnable Environment Variable interpolation in Reverse Proxy configurations svdEMaps remote servers into the local server URL-space using regular expressions ProxyPassReverse [path] urlsvdEリバースプロキシされたサーバから送られた HTTP 応答ヘッダの @@ -846,110 +870,116 @@ Remote Server Auth Remote Server Auth SSLProxyCARevocationPath directory-pathsvEDirectory of PEM-encoded CA CRLs for Remote Server Auth -SSLProxyCheckPeerCN on|off on svEWhether to check the remote server certificates CN field +SSLProxyCheckPeerCN on|off on svEWhether to check the remote server certificate's CN field SSLProxyCheckPeerExpire on|off on svEWhether to check if remote server certificate is expired -SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhECipher Suite available for negotiation in SSL +SSLProxyCheckPeerName on|off on svEConfigure host name checking for remote server certificates + +SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhECipher Suite available for negotiation in SSL proxy handshake -SSLProxyEngine on|off off svESSL Proxy Engine Operation Switch -SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate -SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy -SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy -SSLProxyProtocol [+|-]protocol ... all svEConfigure usable SSL protocol flavors for proxy usage -SSLProxyVerify level none svEType of remote server Certificate verification -SSLProxyVerifyDepth number 1 svEMaximum depth of CA Certificates in Remote Server +SSLProxyEngine on|off off svESSL Proxy Engine Operation Switch +SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate +SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy +SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy +SSLProxyProtocol [+|-]protocol ... all svEConfigure usable SSL protocol flavors for proxy usage +SSLProxyVerify level none svEType of remote server Certificate verification +SSLProxyVerifyDepth number 1 svEMaximum depth of CA Certificates in Remote Server Certificate verification -SSLRandomSeed context source -[bytes]sEPseudo Random Number Generator (PRNG) seeding +SSLRandomSeed context source +[bytes]sEPseudo Random Number Generator (PRNG) seeding source -SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer -SSLRequire expressiondhEAllow access only when an arbitrarily complex +SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer +SSLRequire expressiondhEAllow access only when an arbitrarily complex boolean expression is true -SSLRequireSSLdhEDeny access when SSL is not used for the +SSLRequireSSLdhEDeny access when SSL is not used for the HTTP request -SSLSessionCache type none sEType of the global/inter-process SSL Session +SSLSessionCache type none sEType of the global/inter-process SSL Session Cache -SSLSessionCacheTimeout seconds 300 svENumber of seconds before an SSL session expires +SSLSessionCacheTimeout seconds 300 svENumber of seconds before an SSL session expires in the Session Cache -SSLSessionTicketKeyFile file-pathsvEPersistent encryption/decryption key for TLS session tickets -SSLSRPUnknownUserSeed secret-stringsvESRP unknown user seed -SSLSRPVerifierFile file-pathsvEPath to SRP verifier file -SSLStaplingCache typesEConfigures the OCSP stapling cache -SSLStaplingErrorCacheTimeout seconds 600 svENumber of seconds before expiring invalid responses in the OCSP stapling cache -SSLStaplingFakeTryLater on|off on svESynthesize "tryLater" responses for failed OCSP stapling queries -SSLStaplingForceURL urisvEOverride the OCSP responder URI specified in the certificate's AIA extension -SSLStaplingResponderTimeout seconds 10 svETimeout for OCSP stapling queries -SSLStaplingResponseMaxAge seconds -1 svEMaximum allowable age for OCSP stapling responses -SSLStaplingResponseTimeSkew seconds 300 svEMaximum allowable time skew for OCSP stapling response validation -SSLStaplingReturnResponderErrors on|off on svEPass stapling related OCSP errors on to client -SSLStaplingStandardCacheTimeout seconds 3600 svENumber of seconds before expiring responses in the OCSP stapling cache -SSLStrictSNIVHostCheck on|off off svEWhether to allow non-SNI clients to access a name-based virtual +SSLSessionTicketKeyFile file-pathsvEPersistent encryption/decryption key for TLS session tickets +SSLSRPUnknownUserSeed secret-stringsvESRP unknown user seed +SSLSRPVerifierFile file-pathsvEPath to SRP verifier file +SSLStaplingCache typesEConfigures the OCSP stapling cache +SSLStaplingErrorCacheTimeout seconds 600 svENumber of seconds before expiring invalid responses in the OCSP stapling cache +SSLStaplingFakeTryLater on|off on svESynthesize "tryLater" responses for failed OCSP stapling queries +SSLStaplingForceURL urisvEOverride the OCSP responder URI specified in the certificate's AIA extension +SSLStaplingResponderTimeout seconds 10 svETimeout for OCSP stapling queries +SSLStaplingResponseMaxAge seconds -1 svEMaximum allowable age for OCSP stapling responses +SSLStaplingResponseTimeSkew seconds 300 svEMaximum allowable time skew for OCSP stapling response validation +SSLStaplingReturnResponderErrors on|off on svEPass stapling related OCSP errors on to client +SSLStaplingStandardCacheTimeout seconds 3600 svENumber of seconds before expiring responses in the OCSP stapling cache +SSLStrictSNIVHostCheck on|off off svEWhether to allow non-SNI clients to access a name-based virtual host. -SSLUserName varnamesdhEVariable name to determine user name -SSLUseStapling on|off off svEEnable stapling of OCSP responses in the TLS handshake -SSLVerifyClient level none svdhEType of Client Certificate verification -SSLVerifyDepth number 1 svdhEMaximum depth of CA Certificates in Client +SSLUserName varnamesdhEVariable name to determine user name +SSLUseStapling on|off off svEEnable stapling of OCSP responses in the TLS handshake +SSLVerifyClient level none svdhEType of Client Certificate verification +SSLVerifyDepth number 1 svdhEMaximum depth of CA Certificates in Client Certificate verification -StartServers numbersM起動時に生成される子サーバプロセスの数 -StartThreads numbersM起動時に生成されるスレッドの数 -Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content -Suexec On|OffsBEnable or disable the suEXEC feature -SuexecUserGroup User GroupsvECGI プログラムのユーザパーミッション、グループパーミッション -ThreadLimit numbersM設定可能な子プロセス毎のスレッド数の上限を +StartServers numbersM起動時に生成される子サーバプロセスの数 +StartThreads numbersM起動時に生成されるスレッドの数 +Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content +Suexec On|OffsBEnable or disable the suEXEC feature +SuexecUserGroup User GroupsvECGI プログラムのユーザパーミッション、グループパーミッション +ThreadLimit numbersM設定可能な子プロセス毎のスレッド数の上限を 設定します -ThreadsPerChild numbersM子プロセスそれぞれに生成されるスレッド数 -ThreadStackSize sizesMクライアントのコネクションを受け持つスレッドが使用する +ThreadsPerChild numbersM子プロセスそれぞれに生成されるスレッド数 +ThreadStackSize sizesMクライアントのコネクションを受け持つスレッドが使用する スタックのバイト数 -TimeOut seconds 60 svC各イベントについて、リクエストを失敗させるまでにサーバが +TimeOut seconds 60 svC各イベントについて、リクエストを失敗させるまでにサーバが 待つ時間を設定 -TraceEnable [on|off|extended] on sCTRACE メソッドのリクエストに対する応答方法を決める +TraceEnable [on|off|extended] on sCTRACE メソッドのリクエストに対する応答方法を決める -TransferLog file|pipesvBログファイルの位置を指定 -TypesConfig file-path conf/mime.types smime.types ファイルの位置 -UnDefine parameter-namesCUndefine the existence of a variable +TransferLog file|pipesvBログファイルの位置を指定 +TypesConfig file-path conf/mime.types smime.types ファイルの位置 +UnDefine parameter-namesCUndefine the existence of a variable +UndefMacro namesvdBUndefine a macro UnsetEnv env-variable [env-variable] ...svdhB環境から変数を取り除く -UseCanonicalName On|Off|Dns Off svdCサーバが自分自身の名前とポートを決定する方法を設定する -UseCanonicalPhysicalPort On|Off Off svdC自分自身の名前とポート番号を解決する方法を設定する +Use name [value1 ... valueN] +svdBUse a macro +UseCanonicalName On|Off|Dns Off svdCサーバが自分自身の名前とポートを決定する方法を設定する +UseCanonicalPhysicalPort On|Off Off svdC自分自身の名前とポート番号を解決する方法を設定する -User unix-userid #-1 sBThe userid under which the server will answer +User unix-userid #-1 sBThe userid under which the server will answer requests -UserDir directory-filename [directory-filename] ...svBユーザ専用ディレクトリの位置 -VHostCGIMode On|Off|Secure On vXDetermines whether the virtualhost can run +UserDir directory-filename [directory-filename] ...svBユーザ専用ディレクトリの位置 +VHostCGIMode On|Off|Secure On vXDetermines whether the virtualhost can run subprocesses, and the privileges available to subprocesses. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to subprocesses created +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to subprocesses created by a virtual host. -VHostGroup unix-groupidvXSets the Group ID under which a virtual host runs. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to a virtual host. -VHostSecure On|Off On vXDetermines whether the server runs with enhanced security +VHostGroup unix-groupidvXSets the Group ID under which a virtual host runs. +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to a virtual host. +VHostSecure On|Off On vXDetermines whether the server runs with enhanced security for the virtualhost. -VHostUser unix-useridvXSets the User ID under which a virtual host runs. -VirtualDocumentRoot interpolated-directory|none none svEDynamically configure the location of the document root +VHostUser unix-useridvXSets the User ID under which a virtual host runs. +VirtualDocumentRoot interpolated-directory|none none svEDynamically configure the location of the document root for a given virtual host -VirtualDocumentRootIP interpolated-directory|none none svEDynamically configure the location of the document root +VirtualDocumentRootIP interpolated-directory|none none svEDynamically configure the location of the document root for a given virtual host -<VirtualHost +<VirtualHost addr[:port] [addr[:port]] - ...> ... </VirtualHost>sC特定のホスト名や IP アドレスのみに適用されるディレクティブを + ...> ... </VirtualHost>sC特定のホスト名や IP アドレスのみに適用されるディレクティブを 囲む -VirtualScriptAlias interpolated-directory|none none svEDynamically configure the location of the CGI directory for +VirtualScriptAlias interpolated-directory|none none svEDynamically configure the location of the CGI directory for a given virtual host -VirtualScriptAliasIP interpolated-directory|none none svEDynamically configure the location of the CGI directory for +VirtualScriptAliasIP interpolated-directory|none none svEDynamically configure the location of the CGI directory for a given virtual host -WatchdogInterval number-of-seconds 1 sBWatchdog interval in seconds -XBitHack on|off|full off svdhB実行ビットが設定されたファイルの SSI ディレクティブを +WatchdogInterval number-of-seconds 1 sBWatchdog interval in seconds +XBitHack on|off|full off svdhB実行ビットが設定されたファイルの SSI ディレクティブを 解析する -xml2EncAlias charset alias [alias ...]sBRecognise Aliases for encoding values -xml2EncDefault namesvdhBSets a default encoding to assume when absolutely no information +xml2EncAlias charset alias [alias ...]sBRecognise Aliases for encoding values +xml2EncDefault namesvdhBSets a default encoding to assume when absolutely no information can be automatically detected -xml2StartParse element [element ...]svdhBAdvise the parser to skip leading junk. +xml2StartParse element [element ...]svdhBAdvise the parser to skip leading junk.

    翻訳済み言語:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | diff --git a/docs/manual/mod/quickreference.html.ko.euc-kr b/docs/manual/mod/quickreference.html.ko.euc-kr index 3ecc6f5d..1b000e70 100644 --- a/docs/manual/mod/quickreference.html.ko.euc-kr +++ b/docs/manual/mod/quickreference.html.ko.euc-kr @@ -26,6 +26,7 @@

    :  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -136,108 +137,111 @@ be passed through AsyncRequestWorkerFactor factorsMLimit concurrent connections per process AuthBasicAuthoritative On|Off On dhB Ѻο ⿡ Ѱ Ѵ -AuthBasicProvider On|Off|provider-name -[provider-name] ... On dhB ġ ڸ Ѵ -AuthDBDUserPWQuery querydESQL query to look up a password for a user -AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. +AuthBasicFake off|username [password]dhBFake basic authentication using the given expressions for +username and password +AuthBasicProvider On|Off|provider-name +[provider-name] ... On dhB ġ ڸ Ѵ +AuthDBDUserPWQuery querydESQL query to look up a password for a user +AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. -AuthDBMGroupFile file-pathdhE ׷ ϴ ͺ̽ +AuthDBMGroupFile file-pathdhE ׷ ϴ ͺ̽ ϸ Ѵ -AuthDBMType default|SDBM|GDBM|NDBM|DB default dhEȣ ϴ ͺ̽ +AuthDBMType default|SDBM|GDBM|NDBM|DB default dhEȣ ϴ ͺ̽ Ѵ -AuthDBMUserFile file-pathdhE ڿ ȣ ϴ ͺ̽ +AuthDBMUserFile file-pathdhE ڿ ȣ ϴ ͺ̽ ϸ Ѵ -AuthDigestAlgorithm MD5|MD5-sess MD5 dhXdigest authentication challenge response +AuthDigestAlgorithm MD5|MD5-sess MD5 dhXdigest authentication challenge response hash ϴ ˰ Ѵ -AuthDigestDomain URI [URI] ...dhXdigest authentication ȣ ϴ +AuthDigestDomain URI [URI] ...dhXdigest authentication ȣ ϴ URI -AuthDigestNonceLifetime seconds 300 dhX nonce ȿ Ⱓ -AuthDigestProvider On|Off|provider-name -[provider-name] ... On dhX ġ ڸ Ѵ -AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhXdigest authentication +AuthDigestNonceLifetime seconds 300 dhX nonce ȿ Ⱓ +AuthDigestProvider On|Off|provider-name +[provider-name] ... On dhX ġ ڸ Ѵ +AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhXdigest authentication ȣ(quality-of-protection) Ѵ. -AuthDigestShmemSize size 1000 sXŬ̾Ʈ ϱ Ҵϴ ޸𸮷 -AuthFormAuthoritative On|Off On dhBSets whether authorization and authentication are passed to +AuthDigestShmemSize size 1000 sXŬ̾Ʈ ϱ Ҵϴ ޸𸮷 +AuthFormAuthoritative On|Off On dhBSets whether authorization and authentication are passed to lower level modules -AuthFormBody fieldnamedBThe name of a form field carrying the body of the request to attempt on successful login -AuthFormDisableNoStore On|Off Off dBDisable the CacheControl no-store header on the login page -AuthFormFakeBasicAuth On|Off Off dBFake a Basic Authentication header -AuthFormLocation fieldnamedBThe name of a form field carrying a URL to redirect to on successful login -AuthFormLoginRequiredLocation urldBThe URL of the page to be redirected to should login be required -AuthFormLoginSuccessLocation urldBThe URL of the page to be redirected to should login be successful -AuthFormLogoutLocation uridBThe URL to redirect to after a user has logged out -AuthFormMethod fieldnamedBThe name of a form field carrying the method of the request to attempt on successful login -AuthFormMimetype fieldnamedBThe name of a form field carrying the mimetype of the body of the request to attempt on successful login -AuthFormPassword fieldnamedBThe name of a form field carrying the login password -AuthFormProvider provider-name -[provider-name] ... file dhBSets the authentication provider(s) for this location -AuthFormSitePassphrase secretdBBypass authentication checks for high traffic sites -AuthFormSize sizedBThe largest size of the form in bytes that will be parsed for the login details -AuthFormUsername fieldnamedBThe name of a form field carrying the login username -AuthGroupFile file-pathdhB ׷ ϴ ϸ +AuthFormBody fieldnamedBThe name of a form field carrying the body of the request to attempt on successful login +AuthFormDisableNoStore On|Off Off dBDisable the CacheControl no-store header on the login page +AuthFormFakeBasicAuth On|Off Off dBFake a Basic Authentication header +AuthFormLocation fieldnamedBThe name of a form field carrying a URL to redirect to on successful login +AuthFormLoginRequiredLocation urldBThe URL of the page to be redirected to should login be required +AuthFormLoginSuccessLocation urldBThe URL of the page to be redirected to should login be successful +AuthFormLogoutLocation uridBThe URL to redirect to after a user has logged out +AuthFormMethod fieldnamedBThe name of a form field carrying the method of the request to attempt on successful login +AuthFormMimetype fieldnamedBThe name of a form field carrying the mimetype of the body of the request to attempt on successful login +AuthFormPassword fieldnamedBThe name of a form field carrying the login password +AuthFormProvider provider-name +[provider-name] ... file dhBSets the authentication provider(s) for this location +AuthFormSitePassphrase secretdBBypass authentication checks for high traffic sites +AuthFormSize sizedBThe largest size of the form in bytes that will be parsed for the login details +AuthFormUsername fieldnamedBThe name of a form field carrying the login username +AuthGroupFile file-pathdhB ׷ ϴ ϸ Ѵ -AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during +AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during authorization -AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server -AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN -AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file -AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons -AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs -AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases -AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of +AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server +AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN +AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file +AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons +AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs +AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases +AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of groups. -AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for +AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for group membership -AuthLDAPInitialBindAsUser off|on off dhEDetermines if the server does the initial DN lookup using the basic authentication users' +AuthLDAPInitialBindAsUser off|on off dhEDetermines 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 +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server +AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup -AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be +AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued. -AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user +AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user query to set the REMOTE_USER environment variable -AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER +AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER environment variable -AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches -AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per +AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches +AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per directive line, used to distinguish the members of the current group that are groups. -AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory +AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory objects that are groups during sub-group processing. -AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters -AuthMerging Off | And | Or Off dhBControls the manner in which each configuration section's +AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters +AuthMerging Off | And | Or Off dhBControls the manner in which each configuration section's authorization logic is combined with that of preceding configuration sections. -AuthName auth-domaindhBAuthorization realm for use in HTTP +AuthName auth-domaindhBAuthorization realm for use in HTTP authentication -AuthnCacheContext directory|server|custom-stringdBSpecify a context string for use in the cache key -AuthnCacheEnablesBEnable Authn caching configured anywhere -AuthnCacheProvideFor authn-provider [...]dhBSpecify which authn provider(s) to cache for -AuthnCacheSOCache provider-namesBSelect socache backend provider to use -AuthnCacheTimeout timeout (seconds)dhBSet a timeout for cache entries -<AuthnProviderAlias baseProvider Alias> -... </AuthnProviderAlias>sBEnclose a group of directives that represent an +AuthnCacheContext directory|server|custom-stringdBSpecify a context string for use in the cache key +AuthnCacheEnablesBEnable Authn caching configured anywhere +AuthnCacheProvideFor authn-provider [...]dhBSpecify which authn provider(s) to cache for +AuthnCacheSOCache provider-namesBSelect socache backend provider to use +AuthnCacheTimeout timeout (seconds)dhBSet a timeout for cache entries +<AuthnProviderAlias baseProvider Alias> +... </AuthnProviderAlias>sBEnclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias -AuthType None|Basic|Digest|FormdhBType of user authentication -AuthUserFile file-pathdhB ڸ ȣ ϴ ϸ +AuthType None|Basic|Digest|FormdhBType of user authentication +AuthUserFile file-pathdhB ڸ ȣ ϴ ϸ Ѵ -AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring +AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring page on successful login or logout if a Referer request header is present -AuthzDBDQuery querydESpecify the SQL Query for the required operation -AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user -AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhEȣ ϴ ͺ̽ Ѵ -<AuthzProviderAlias baseProvider Alias Require-Parameters> +AuthzDBDQuery querydESpecify the SQL Query for the required operation +AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user +AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhEȣ ϴ ͺ̽ Ѵ +<AuthzProviderAlias baseProvider Alias Require-Parameters> ... </AuthzProviderAlias> -sBEnclose a group of directives that represent an +sBEnclose a group of directives that represent an extension of a base authorization provider and referenced by the specified alias -AuthzSendForbiddenOnFailure On|Off Off dhBSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if +AuthzSendForbiddenOnFailure On|Off Off dhBSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if authentication succeeds but authorization fails -BalancerGrowth # 5 svENumber of additional Balancers that can be added Post-configuration +BalancerGrowth # 5 svENumber of additional Balancers that can be added Post-configuration +BalancerInherit On|Off On svEInherit ProxyPassed Balancers/Workers from the main server BalancerMember [balancerurl] url [key=value [key=value ...]]dEAdd a member to a load balancing group BalancerPersist On|Off Off svEAttempt to persist changes made by the Balancer Manager across restarts. BrowserMatch regex [!]env-variable[=value] @@ -279,6 +283,18 @@ cached by proxy servers svdhXThe minimum time (in milliseconds) that should elapse while reading before data is sent downstream CacheRoot directorysvXij 丮 root +CacheSocache type[:args]svEThe directory root under which cache files are +stored +CacheSocacheMaxSize bytes 102400 svdhEThe maximum size (in bytes) of an entry to be placed in the +cache +CacheSocacheMaxTime seconds 86400 svdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheMinTime seconds 600 svdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheReadSize bytes 0 svdhEThe minimum size (in bytes) of the document to read and be cached + before sending the data downstream +CacheSocacheReadTime milliseconds 0 svdhEThe minimum time (in milliseconds) that should elapse while reading + before data is sent downstream svdhXServe stale content in place of 5xx responses. svdhXAttempt to cache responses that the server reports as expired svdhXAttempt to cache requests or responses that have been marked as no-store. @@ -531,115 +547,123 @@ matching URLs LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesXPlug an authorization provider function into mod_authz_core -LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the access_checker phase of request processing -LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the auth_checker phase of request processing -LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the check_user_id phase of request processing -LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the fixups phase of request +LuaCodeCache stat|forever|never stat svdhXConfigure the compiled code cache. +LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the access_checker phase of request processing +LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the auth_checker phase of request processing +LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the check_user_id phase of request processing +LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the fixups phase of a request processing -LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the insert_filter phase of request processing -LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the map_to_storage phase of request processing -LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svXProvide a hook for the translate name phase of request processing -LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the type_checker phase of request processing -LuaInherit none|parent-first|parent-last parent-first svdhXControls how parent configuration sections are merged into children +LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the insert_filter phase of request processing +LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the map_to_storage phase of request processing +LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svXProvide a hook for the translate name phase of request processing +LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the type_checker phase of request processing +LuaInherit none|parent-first|parent-last parent-first svdhXControls how parent configuration sections are merged into children +LuaInputFilter filter_name /path/to/lua/script.lua function_namesXProvide a Lua function for content input filtering +LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhXMap a path to a lua handler +LuaOutputFilter filter_name /path/to/lua/script.lua function_namesXProvide a Lua function for content output filtering LuaPackageCPath /path/to/include/?.soasvdhXAdd a directory to lua's package.cpath LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn, thread -- default is once -MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once + +<Macro name [par1 .. parN]> +... </Macro>svdBDefine a configuration file macro +MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life -MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent +MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent connection -MaxMemFree KBytes 2048 sMMaximum amount of memory that the main allocator is allowed +MaxMemFree KBytes 2048 sMMaximum amount of memory that the main allocator is allowed to hold without calling free() -MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdCNumber of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete +MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdCNumber of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete resource -MaxRangeReversals default | unlimited | none | number-of-ranges 20 svdCNumber of range reversals (eg: 100-200,50-70) allowed before returning the complete +MaxRangeReversals default | unlimited | none | number-of-ranges 20 svdCNumber of range reversals (eg: 100-200,50-70) allowed before returning the complete resource -MaxRanges default | unlimited | none | number-of-ranges 200 svdCNumber of ranges allowed before returning the complete +MaxRanges default | unlimited | none | number-of-ranges 200 svdCNumber of ranges allowed before returning the complete resource -MaxRequestWorkers numbersMMaximum number of connections that will be processed +MaxRequestWorkers numbersMMaximum number of connections that will be processed simultaneously -MaxSpareServers number 10 sMMaximum number of idle child server processes -MaxSpareThreads numbersMMaximum number of idle threads -MaxThreads number 2048 sMSet the maximum number of worker threads -MetaDir directory .web svdhECERN Ÿ ã 丮 ̸ -MetaFiles on|off off svdhECERN Ÿ óѴ -MetaSuffix suffix .meta svdhECERN Ÿ ϴ ̻ -MimeMagicFile file-pathsvEEnable MIME-type determination based on file contents +MaxSpareServers number 10 sMMaximum number of idle child server processes +MaxSpareThreads numbersMMaximum number of idle threads +MaxThreads number 2048 sMSet the maximum number of worker threads +MetaDir directory .web svdhECERN Ÿ ã 丮 ̸ +MetaFiles on|off off svdhECERN Ÿ óѴ +MetaSuffix suffix .meta svdhECERN Ÿ ϴ ̻ +MimeMagicFile file-pathsvEEnable MIME-type determination based on file contents using the specified magic file -MinSpareServers number 5 sMMinimum number of idle child server processes -MinSpareThreads numbersMMinimum number of idle threads available to handle request +MinSpareServers number 5 sMMinimum number of idle child server processes +MinSpareThreads numbersMMinimum number of idle threads available to handle request spikes -MMapFile file-path [file-path] ...sX۽ ޸𸮿 Ѵ -ModemStandard V.21|V.26bis|V.32|V.92dXModem standard to simulate -ModMimeUsePathInfo On|Off Off dBTells mod_mime to treat path_info +MMapFile file-path [file-path] ...sX۽ ޸𸮿 Ѵ +ModemStandard V.21|V.26bis|V.32|V.92dXModem standard to simulate +ModMimeUsePathInfo On|Off Off dBTells mod_mime to treat path_info components as part of the filename -MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers -[Handlers|Filters] NegotiatedOnly svdhBThe types of files that will be included when searching for +MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers +[Handlers|Filters] NegotiatedOnly svdhBThe types of files that will be included when searching for a matching file with MultiViews -Mutex mechanism [default|mutex-name] ... [OmitPID] default sCConfigures mutex mechanism and lock file directory for all +Mutex mechanism [default|mutex-name] ... [OmitPID] default sCConfigures mutex mechanism and lock file directory for all or specified mutexes -NameVirtualHost addr[:port]sCDEPRECATED: Designates an IP address for name-virtual +NameVirtualHost addr[:port]sCDEPRECATED: Designates an IP address for name-virtual hosting -NoProxy host [host] ...svEHosts, domains, or networks that will be connected to +NoProxy host [host] ...svEHosts, domains, or networks that will be connected to directly -NWSSLTrustedCerts filename [filename] ...sBList of additional client certificates -NWSSLUpgradeable [IP-address:]portnumbersBAllows a connection to be upgraded to an SSL connection upon request -Options - [+|-]option [[+|-]option] ... FollowSymlinks svdhCConfigures what features are available in a particular +NWSSLTrustedCerts filename [filename] ...sBList of additional client certificates +NWSSLUpgradeable [IP-address:]portnumbersBAllows a connection to be upgraded to an SSL connection upon request +Options + [+|-]option [[+|-]option] ... FollowSymlinks svdhCConfigures what features are available in a particular directory - Order ordering Deny,Allow dhEControls the default access state and the order in which + Order ordering Deny,Allow dhEControls the default access state and the order in which Allow and Deny are evaluated. -OutputSed sed-commanddhXSed command for filtering response content -PassEnv env-variable [env-variable] -...svdhB ȯ溯 ´ -PidFile filename logs/httpd.pid sMFile where the server records the process ID +OutputSed sed-commanddhXSed command for filtering response content +PassEnv env-variable [env-variable] +...svdhB ȯ溯 ´ +PidFile filename logs/httpd.pid sMFile where the server records the process ID of the daemon -PrivilegesMode FAST|SECURE|SELECTIVE FAST svdXTrade off processing speed and efficiency vs security against +PrivilegesMode FAST|SECURE|SELECTIVE FAST svdXTrade off processing speed and efficiency vs security against malicious privileges-aware code. -Protocol protocolsvCProtocol for a listening socket -ProtocolEcho On|OffsvXecho Ű -<Proxy wildcard-url> ...</Proxy>svEContainer for directives applied to proxied resources -ProxyAddHeaders Off|On On svdEAdd proxy information in X-Forwarded-* headers -ProxyBadHeader IsError|Ignore|StartBody IsError svEDetermines how to handle bad header lines in a +Protocol protocolsvCProtocol for a listening socket +ProtocolEcho On|OffsvXecho Ű +<Proxy wildcard-url> ...</Proxy>svEContainer for directives applied to proxied resources +ProxyAddHeaders Off|On On svdEAdd proxy information in X-Forwarded-* headers +ProxyBadHeader IsError|Ignore|StartBody IsError svEDetermines how to handle bad header lines in a response -ProxyBlock *|word|host|domain -[word|host|domain] ...svEWords, hosts, or domains that are banned from being +ProxyBlock *|word|host|domain +[word|host|domain] ...svEWords, hosts, or domains that are banned from being proxied -ProxyDomain DomainsvEDefault domain name for proxied requests -ProxyErrorOverride On|Off Off svdEOverride error pages for proxied content -ProxyExpressDBMFile <pathname>svEPathname to DBM file. -ProxyExpressDBMFile <type>svEDBM type of file. -ProxyExpressEnable [on|off]svEEnable the module functionality. -ProxyFtpDirCharset character set ISO-8859-1 svdEDefine the character set for proxied FTP listings -ProxyFtpEscapeWildcards [on|off]svdEWhether wildcards in requested filenames are escaped when sent to the FTP server -ProxyFtpListOnWildcard [on|off]svdEWhether wildcards in requested filenames trigger a file listing -ProxyHTMLBufSize bytessvdBSets the buffer size increment for buffering inline scripts and +ProxyDomain DomainsvEDefault domain name for proxied requests +ProxyErrorOverride On|Off Off svdEOverride error pages for proxied content +ProxyExpressDBMFile <pathname>svEPathname to DBM file. +ProxyExpressDBMFile <type>svEDBM type of file. +ProxyExpressEnable [on|off]svEEnable the module functionality. +ProxyFtpDirCharset character set ISO-8859-1 svdEDefine the character set for proxied FTP listings +ProxyFtpEscapeWildcards [on|off]svdEWhether wildcards in requested filenames are escaped when sent to the FTP server +ProxyFtpListOnWildcard [on|off]svdEWhether wildcards in requested filenames trigger a file listing +ProxyHTMLBufSize bytessvdBSets the buffer size increment for buffering inline scripts and stylesheets. -ProxyHTMLCharsetOut Charset | *svdBSpecify a charset for mod_proxy_html output. -ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdBSets an HTML or XHTML document type declaration. -ProxyHTMLEnable On|Off Off svdBTurns the proxy_html filter on or off. -ProxyHTMLEvents attribute [attribute ...]svdBSpecify attributes to treat as scripting events. -ProxyHTMLExtended On|Off Off svdBDetermines whether to fix links in inline scripts, stylesheets, +ProxyHTMLCharsetOut Charset | *svdBSpecify a charset for mod_proxy_html output. +ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdBSets an HTML or XHTML document type declaration. +ProxyHTMLEnable On|Off Off svdBTurns the proxy_html filter on or off. +ProxyHTMLEvents attribute [attribute ...]svdBSpecify attributes to treat as scripting events. +ProxyHTMLExtended On|Off Off svdBDetermines whether to fix links in inline scripts, stylesheets, and scripting events. -ProxyHTMLFixups [lowercase] [dospath] [reset]svdBFixes for simple HTML errors. -ProxyHTMLInterp On|Off Off svdBEnables per-request interpolation of +ProxyHTMLFixups [lowercase] [dospath] [reset]svdBFixes for simple HTML errors. +ProxyHTMLInterp On|Off Off svdBEnables per-request interpolation of ProxyHTMLURLMap rules. -ProxyHTMLLinks element attribute [attribute2 ...]svdBSpecify HTML elements that have URL attributes to be rewritten. -ProxyHTMLMeta On|Off Off svdBTurns on or off extra pre-parsing of metadata in HTML +ProxyHTMLLinks element attribute [attribute2 ...]svdBSpecify HTML elements that have URL attributes to be rewritten. +ProxyHTMLMeta On|Off Off svdBTurns on or off extra pre-parsing of metadata in HTML <head> sections. -ProxyHTMLStripComments On|Off Off svdBDetermines whether to strip HTML comments. -ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdBDefines a rule to rewrite HTML links -ProxyIOBufferSize bytes 8192 svEDetermine size of internal data throughput buffer -<ProxyMatch regex> ...</ProxyMatch>svEContainer for directives applied to regular-expression-matched +ProxyHTMLStripComments On|Off Off svdBDetermines whether to strip HTML comments. +ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdBDefines a rule to rewrite HTML links +ProxyIOBufferSize bytes 8192 svEDetermine size of internal data throughput buffer +<ProxyMatch regex> ...</ProxyMatch>svEContainer for directives applied to regular-expression-matched proxied resources -ProxyMaxForwards number -1 svEMaximium number of proxies that a request can be forwarded +ProxyMaxForwards number -1 svEMaximium number of proxies that a request can be forwarded through -ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate] [noquery]svdEMaps remote servers into the local server URL-space +ProxyPass [path] !|url [key=value + [key=value ...]] [nocanon] [interpolate] [noquery]svdEMaps remote servers into the local server URL-space +ProxyPassInherit On|Off On svEInherit ProxyPass directives defined from the main server ProxyPassInterpolateEnv On|Off Off svdEEnable Environment Variable interpolation in Reverse Proxy configurations ProxyPassMatch [regex] !|url [key=value [key=value ...]]svdEMaps remote servers into the local server URL-space using regular expressions @@ -871,109 +895,115 @@ Remote Server Auth Remote Server Auth SSLProxyCARevocationPath directory-pathsvEDirectory of PEM-encoded CA CRLs for Remote Server Auth -SSLProxyCheckPeerCN on|off on svEWhether to check the remote server certificates CN field +SSLProxyCheckPeerCN on|off on svEWhether to check the remote server certificate's CN field SSLProxyCheckPeerExpire on|off on svEWhether to check if remote server certificate is expired -SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhECipher Suite available for negotiation in SSL +SSLProxyCheckPeerName on|off on svEConfigure host name checking for remote server certificates + +SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhECipher Suite available for negotiation in SSL proxy handshake -SSLProxyEngine on|off off svESSL Proxy Engine Operation Switch -SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate -SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy -SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy -SSLProxyProtocol [+|-]protocol ... all svEConfigure usable SSL protocol flavors for proxy usage -SSLProxyVerify level none svEType of remote server Certificate verification -SSLProxyVerifyDepth number 1 svEMaximum depth of CA Certificates in Remote Server +SSLProxyEngine on|off off svESSL Proxy Engine Operation Switch +SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate +SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy +SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy +SSLProxyProtocol [+|-]protocol ... all svEConfigure usable SSL protocol flavors for proxy usage +SSLProxyVerify level none svEType of remote server Certificate verification +SSLProxyVerifyDepth number 1 svEMaximum depth of CA Certificates in Remote Server Certificate verification -SSLRandomSeed context source -[bytes]sEPseudo Random Number Generator (PRNG) seeding +SSLRandomSeed context source +[bytes]sEPseudo Random Number Generator (PRNG) seeding source -SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer -SSLRequire expressiondhEAllow access only when an arbitrarily complex +SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer +SSLRequire expressiondhEAllow access only when an arbitrarily complex boolean expression is true -SSLRequireSSLdhEDeny access when SSL is not used for the +SSLRequireSSLdhEDeny access when SSL is not used for the HTTP request -SSLSessionCache type none sEType of the global/inter-process SSL Session +SSLSessionCache type none sEType of the global/inter-process SSL Session Cache -SSLSessionCacheTimeout seconds 300 svENumber of seconds before an SSL session expires +SSLSessionCacheTimeout seconds 300 svENumber of seconds before an SSL session expires in the Session Cache -SSLSessionTicketKeyFile file-pathsvEPersistent encryption/decryption key for TLS session tickets -SSLSRPUnknownUserSeed secret-stringsvESRP unknown user seed -SSLSRPVerifierFile file-pathsvEPath to SRP verifier file -SSLStaplingCache typesEConfigures the OCSP stapling cache -SSLStaplingErrorCacheTimeout seconds 600 svENumber of seconds before expiring invalid responses in the OCSP stapling cache -SSLStaplingFakeTryLater on|off on svESynthesize "tryLater" responses for failed OCSP stapling queries -SSLStaplingForceURL urisvEOverride the OCSP responder URI specified in the certificate's AIA extension -SSLStaplingResponderTimeout seconds 10 svETimeout for OCSP stapling queries -SSLStaplingResponseMaxAge seconds -1 svEMaximum allowable age for OCSP stapling responses -SSLStaplingResponseTimeSkew seconds 300 svEMaximum allowable time skew for OCSP stapling response validation -SSLStaplingReturnResponderErrors on|off on svEPass stapling related OCSP errors on to client -SSLStaplingStandardCacheTimeout seconds 3600 svENumber of seconds before expiring responses in the OCSP stapling cache -SSLStrictSNIVHostCheck on|off off svEWhether to allow non-SNI clients to access a name-based virtual +SSLSessionTicketKeyFile file-pathsvEPersistent encryption/decryption key for TLS session tickets +SSLSRPUnknownUserSeed secret-stringsvESRP unknown user seed +SSLSRPVerifierFile file-pathsvEPath to SRP verifier file +SSLStaplingCache typesEConfigures the OCSP stapling cache +SSLStaplingErrorCacheTimeout seconds 600 svENumber of seconds before expiring invalid responses in the OCSP stapling cache +SSLStaplingFakeTryLater on|off on svESynthesize "tryLater" responses for failed OCSP stapling queries +SSLStaplingForceURL urisvEOverride the OCSP responder URI specified in the certificate's AIA extension +SSLStaplingResponderTimeout seconds 10 svETimeout for OCSP stapling queries +SSLStaplingResponseMaxAge seconds -1 svEMaximum allowable age for OCSP stapling responses +SSLStaplingResponseTimeSkew seconds 300 svEMaximum allowable time skew for OCSP stapling response validation +SSLStaplingReturnResponderErrors on|off on svEPass stapling related OCSP errors on to client +SSLStaplingStandardCacheTimeout seconds 3600 svENumber of seconds before expiring responses in the OCSP stapling cache +SSLStrictSNIVHostCheck on|off off svEWhether to allow non-SNI clients to access a name-based virtual host. -SSLUserName varnamesdhEVariable name to determine user name -SSLUseStapling on|off off svEEnable stapling of OCSP responses in the TLS handshake -SSLVerifyClient level none svdhEType of Client Certificate verification -SSLVerifyDepth number 1 svdhEMaximum depth of CA Certificates in Client +SSLUserName varnamesdhEVariable name to determine user name +SSLUseStapling on|off off svEEnable stapling of OCSP responses in the TLS handshake +SSLVerifyClient level none svdhEType of Client Certificate verification +SSLVerifyDepth number 1 svdhEMaximum depth of CA Certificates in Client Certificate verification -StartServers numbersMNumber of child server processes created at startup -StartThreads numbersMNumber of threads created on startup -Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content -Suexec On|OffsBEnable or disable the suEXEC feature -SuexecUserGroup User GroupsvECGI α׷ ڿ ׷ -ThreadLimit numbersMSets the upper limit on the configurable number of threads +StartServers numbersMNumber of child server processes created at startup +StartThreads numbersMNumber of threads created on startup +Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content +Suexec On|OffsBEnable or disable the suEXEC feature +SuexecUserGroup User GroupsvECGI α׷ ڿ ׷ +ThreadLimit numbersMSets the upper limit on the configurable number of threads per child process -ThreadsPerChild numbersMNumber of threads created by each child process -ThreadStackSize sizesMThe size in bytes of the stack used by threads handling +ThreadsPerChild numbersMNumber of threads created by each child process +ThreadStackSize sizesMThe size in bytes of the stack used by threads handling client connections -TimeOut seconds 60 svCAmount of time the server will wait for +TimeOut seconds 60 svCAmount of time the server will wait for certain events before failing a request -TraceEnable [on|off|extended] on svCDetermines the behavior on TRACE requests -TransferLog file|pipesvBα ġ Ѵ -TypesConfig file-path conf/mime.types sBThe location of the mime.types file -UnDefine parameter-namesCUndefine the existence of a variable +TraceEnable [on|off|extended] on svCDetermines the behavior on TRACE requests +TransferLog file|pipesvBα ġ Ѵ +TypesConfig file-path conf/mime.types sBThe location of the mime.types file +UnDefine parameter-namesCUndefine the existence of a variable +UndefMacro namesvdBUndefine a macro UnsetEnv env-variable [env-variable] ...svdhBȯ溯 Ѵ -UseCanonicalName On|Off|DNS Off svdCConfigures how the server determines its own name and +Use name [value1 ... valueN] +svdBUse a macro +UseCanonicalName On|Off|DNS Off svdCConfigures how the server determines its own name and port -UseCanonicalPhysicalPort On|Off Off svdCConfigures how the server determines its own port -User unix-userid #-1 sBThe userid under which the server will answer +UseCanonicalPhysicalPort On|Off Off svdCConfigures how the server determines its own port +User unix-userid #-1 sBThe userid under which the server will answer requests -UserDir directory-filename public_html svBں 丮 ġ -VHostCGIMode On|Off|Secure On vXDetermines whether the virtualhost can run +UserDir directory-filename public_html svBں 丮 ġ +VHostCGIMode On|Off|Secure On vXDetermines whether the virtualhost can run subprocesses, and the privileges available to subprocesses. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to subprocesses created +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to subprocesses created by a virtual host. -VHostGroup unix-groupidvXSets the Group ID under which a virtual host runs. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to a virtual host. -VHostSecure On|Off On vXDetermines whether the server runs with enhanced security +VHostGroup unix-groupidvXSets the Group ID under which a virtual host runs. +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to a virtual host. +VHostSecure On|Off On vXDetermines whether the server runs with enhanced security for the virtualhost. -VHostUser unix-useridvXSets the User ID under which a virtual host runs. -VirtualDocumentRoot interpolated-directory|none none svEDynamically configure the location of the document root +VHostUser unix-useridvXSets the User ID under which a virtual host runs. +VirtualDocumentRoot interpolated-directory|none none svEDynamically configure the location of the document root for a given virtual host -VirtualDocumentRootIP interpolated-directory|none none svEDynamically configure the location of the document root +VirtualDocumentRootIP interpolated-directory|none none svEDynamically configure the location of the document root for a given virtual host -<VirtualHost +<VirtualHost addr[:port] [addr[:port]] - ...> ... </VirtualHost>sCContains directives that apply only to a specific + ...> ... </VirtualHost>sCContains directives that apply only to a specific hostname or IP address -VirtualScriptAlias interpolated-directory|none none svEDynamically configure the location of the CGI directory for +VirtualScriptAlias interpolated-directory|none none svEDynamically configure the location of the CGI directory for a given virtual host -VirtualScriptAliasIP interpolated-directory|none none svEDynamically configure the location of the CGI directory for +VirtualScriptAliasIP interpolated-directory|none none svEDynamically configure the location of the CGI directory for a given virtual host -WatchdogInterval number-of-seconds 1 sBWatchdog interval in seconds -XBitHack on|off|full off svdhBParse SSI directives in files with the execute bit +WatchdogInterval number-of-seconds 1 sBWatchdog interval in seconds +XBitHack on|off|full off svdhBParse SSI directives in files with the execute bit set -xml2EncAlias charset alias [alias ...]sBRecognise Aliases for encoding values -xml2EncDefault namesvdhBSets a default encoding to assume when absolutely no information +xml2EncAlias charset alias [alias ...]sBRecognise Aliases for encoding values +xml2EncDefault namesvdhBSets a default encoding to assume when absolutely no information can be automatically detected -xml2StartParse element [element ...]svdhBAdvise the parser to skip leading junk. +xml2StartParse element [element ...]svdhBAdvise the parser to skip leading junk.

    :  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | diff --git a/docs/manual/mod/quickreference.html.tr.utf8 b/docs/manual/mod/quickreference.html.tr.utf8 index 42da8e18..3fb50bda 100644 --- a/docs/manual/mod/quickreference.html.tr.utf8 +++ b/docs/manual/mod/quickreference.html.tr.utf8 @@ -26,6 +26,7 @@

    Mevcut Diller:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -145,110 +146,113 @@ formatted email address AsyncRequestWorkerFactor factorsMLimit concurrent connections per process AuthBasicAuthoritative On|Off On dhTSets whether authorization and authentication are passed to lower level modules -AuthBasicProvider provider-name -[provider-name] ... file dhTSets the authentication provider(s) for this location -AuthDBDUserPWQuery querydESQL query to look up a password for a user -AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. +AuthBasicFake off|username [password]dhTFake basic authentication using the given expressions for +username and password +AuthBasicProvider provider-name +[provider-name] ... file dhTSets the authentication provider(s) for this location +AuthDBDUserPWQuery querydESQL query to look up a password for a user +AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. -AuthDBMGroupFile file-pathdhESets the name of the database file containing the list +AuthDBMGroupFile file-pathdhESets the name of the database file containing the list of user groups for authorization -AuthDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to +AuthDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to store passwords -AuthDBMUserFile file-pathdhESets the name of a database file containing the list of users and +AuthDBMUserFile file-pathdhESets the name of a database file containing the list of users and passwords for authentication -AuthDigestAlgorithm MD5|MD5-sess MD5 dhESelects the algorithm used to calculate the challenge and +AuthDigestAlgorithm MD5|MD5-sess MD5 dhESelects the algorithm used to calculate the challenge and response hashes in digest authentication -AuthDigestDomain URI [URI] ...dhEURIs that are in the same protection space for digest +AuthDigestDomain URI [URI] ...dhEURIs that are in the same protection space for digest authentication -AuthDigestNonceLifetime seconds 300 dhEHow long the server nonce is valid -AuthDigestProvider provider-name -[provider-name] ... file dhESets the authentication provider(s) for this location -AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhEDetermines the quality-of-protection to use in digest +AuthDigestNonceLifetime seconds 300 dhEHow long the server nonce is valid +AuthDigestProvider provider-name +[provider-name] ... file dhESets the authentication provider(s) for this location +AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhEDetermines the quality-of-protection to use in digest authentication -AuthDigestShmemSize size 1000 sEThe amount of shared memory to allocate for keeping track +AuthDigestShmemSize size 1000 sEThe amount of shared memory to allocate for keeping track of clients -AuthFormAuthoritative On|Off On dhTSets whether authorization and authentication are passed to +AuthFormAuthoritative On|Off On dhTSets whether authorization and authentication are passed to lower level modules -AuthFormBody fieldnamedTThe name of a form field carrying the body of the request to attempt on successful login -AuthFormDisableNoStore On|Off Off dTDisable the CacheControl no-store header on the login page -AuthFormFakeBasicAuth On|Off Off dTFake a Basic Authentication header -AuthFormLocation fieldnamedTThe name of a form field carrying a URL to redirect to on successful login -AuthFormLoginRequiredLocation urldTThe URL of the page to be redirected to should login be required -AuthFormLoginSuccessLocation urldTThe URL of the page to be redirected to should login be successful -AuthFormLogoutLocation uridTThe URL to redirect to after a user has logged out -AuthFormMethod fieldnamedTThe name of a form field carrying the method of the request to attempt on successful login -AuthFormMimetype fieldnamedTThe name of a form field carrying the mimetype of the body of the request to attempt on successful login -AuthFormPassword fieldnamedTThe name of a form field carrying the login password -AuthFormProvider provider-name -[provider-name] ... file dhTSets the authentication provider(s) for this location -AuthFormSitePassphrase secretdTBypass authentication checks for high traffic sites -AuthFormSize sizedTThe largest size of the form in bytes that will be parsed for the login details -AuthFormUsername fieldnamedTThe name of a form field carrying the login username -AuthGroupFile file-pathdhTSets the name of a text file containing the list +AuthFormBody fieldnamedTThe name of a form field carrying the body of the request to attempt on successful login +AuthFormDisableNoStore On|Off Off dTDisable the CacheControl no-store header on the login page +AuthFormFakeBasicAuth On|Off Off dTFake a Basic Authentication header +AuthFormLocation fieldnamedTThe name of a form field carrying a URL to redirect to on successful login +AuthFormLoginRequiredLocation urldTThe URL of the page to be redirected to should login be required +AuthFormLoginSuccessLocation urldTThe URL of the page to be redirected to should login be successful +AuthFormLogoutLocation uridTThe URL to redirect to after a user has logged out +AuthFormMethod fieldnamedTThe name of a form field carrying the method of the request to attempt on successful login +AuthFormMimetype fieldnamedTThe name of a form field carrying the mimetype of the body of the request to attempt on successful login +AuthFormPassword fieldnamedTThe name of a form field carrying the login password +AuthFormProvider provider-name +[provider-name] ... file dhTSets the authentication provider(s) for this location +AuthFormSitePassphrase secretdTBypass authentication checks for high traffic sites +AuthFormSize sizedTThe largest size of the form in bytes that will be parsed for the login details +AuthFormUsername fieldnamedTThe name of a form field carrying the login username +AuthGroupFile file-pathdhTSets the name of a text file containing the list of user groups for authorization -AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during +AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during authorization -AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server -AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN -AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file -AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons -AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs -AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases -AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of +AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server +AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN +AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file +AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons +AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs +AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases +AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of groups. -AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for +AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for group membership -AuthLDAPInitialBindAsUser off|on off dhEDetermines if the server does the initial DN lookup using the basic authentication users' +AuthLDAPInitialBindAsUser off|on off dhEDetermines 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 +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server +AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup -AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be +AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued. -AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user +AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user query to set the REMOTE_USER environment variable -AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER +AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER environment variable -AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches -AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per +AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches +AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per directive line, used to distinguish the members of the current group that are groups. -AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory +AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory objects that are groups during sub-group processing. -AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters -AuthMerging Off | And | Or Off dhTControls the manner in which each configuration section's +AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters +AuthMerging Off | And | Or Off dhTControls the manner in which each configuration section's authorization logic is combined with that of preceding configuration sections. -AuthName auth-domaindhTAuthorization realm for use in HTTP +AuthName auth-domaindhTAuthorization realm for use in HTTP authentication -AuthnCacheContext directory|server|custom-stringdTSpecify a context string for use in the cache key -AuthnCacheEnablesTEnable Authn caching configured anywhere -AuthnCacheProvideFor authn-provider [...]dhTSpecify which authn provider(s) to cache for -AuthnCacheSOCache provider-namesTSelect socache backend provider to use -AuthnCacheTimeout timeout (seconds)dhTSet a timeout for cache entries -<AuthnProviderAlias baseProvider Alias> -... </AuthnProviderAlias>sTEnclose a group of directives that represent an +AuthnCacheContext directory|server|custom-stringdTSpecify a context string for use in the cache key +AuthnCacheEnablesTEnable Authn caching configured anywhere +AuthnCacheProvideFor authn-provider [...]dhTSpecify which authn provider(s) to cache for +AuthnCacheSOCache provider-namesTSelect socache backend provider to use +AuthnCacheTimeout timeout (seconds)dhTSet a timeout for cache entries +<AuthnProviderAlias baseProvider Alias> +... </AuthnProviderAlias>sTEnclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias -AuthType None|Basic|Digest|FormdhTType of user authentication -AuthUserFile file-pathdhTSets the name of a text file containing the list of users and +AuthType None|Basic|Digest|FormdhTType of user authentication +AuthUserFile file-pathdhTSets the name of a text file containing the list of users and passwords for authentication -AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring +AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring page on successful login or logout if a Referer request header is present -AuthzDBDQuery querydESpecify the SQL Query for the required operation -AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user -AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to +AuthzDBDQuery querydESpecify the SQL Query for the required operation +AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user +AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to store list of user groups -<AuthzProviderAlias baseProvider Alias Require-Parameters> +<AuthzProviderAlias baseProvider Alias Require-Parameters> ... </AuthzProviderAlias> -sTEnclose a group of directives that represent an +sTEnclose a group of directives that represent an extension of a base authorization provider and referenced by the specified alias -AuthzSendForbiddenOnFailure On|Off Off dhTSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if +AuthzSendForbiddenOnFailure On|Off Off dhTSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if authentication succeeds but authorization fails -BalancerGrowth # 5 skENumber of additional Balancers that can be added Post-configuration +BalancerGrowth # 5 skENumber of additional Balancers that can be added Post-configuration +BalancerInherit On|Off On skEInherit ProxyPassed Balancers/Workers from the main server BalancerMember [balancerurl] url [key=value [key=value ...]]dEAdd a member to a load balancing group BalancerPersist On|Off Off skEAttempt to persist changes made by the Balancer Manager across restarts. BrowserMatch düzifd [!]ort-değişkeni[=değer] @@ -299,6 +303,18 @@ cached by proxy servers before data is sent downstream CacheRoot directoryskEThe directory root under which cache files are stored +CacheSocache type[:args]skEThe directory root under which cache files are +stored +CacheSocacheMaxSize bytes 102400 skdhEThe maximum size (in bytes) of an entry to be placed in the +cache +CacheSocacheMaxTime seconds 86400 skdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheMinTime seconds 600 skdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheReadSize bytes 0 skdhEThe minimum size (in bytes) of the document to read and be cached + before sending the data downstream +CacheSocacheReadTime milliseconds 0 skdhEThe minimum time (in milliseconds) that should elapse while reading + before data is sent downstream CacheStaleOnError on|off on skdhEServe stale content in place of 5xx responses. CacheStoreExpired On|Off Off skdhEAttempt to cache responses that the server reports as expired CacheStoreNoStore On|Off Off skdhEAttempt to cache requests or responses that have been marked as no-store. @@ -405,7 +421,7 @@ by MIME type ExtendedStatus On|Off Off[*] sÇHer istekte ek durum bilgisinin izini sürer ExtFilterDefine filtername parameterssEDefine an external filter ExtFilterOptions option [option] ... NoLogStderr dEConfigure mod_ext_filter options -FallbackResource yerel-urlskdhTBir dosya ile eşleşmeyen istekler için öntanımlı URL tanımlar +FallbackResource disabled | yerel-urlskdhTBir dosya ile eşleşmeyen istekler için öntanımlı URL tanımlar 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 @@ -541,9 +557,9 @@ sınırlar. [protokol]sMSunucunun dinleyeceği IP adresini ve portu belirler. ListenBacklog kuyruk-uzunluğusMBekleyen bağlantılar kuyruğunun azami uzunluğunu belirler -LoadFile dosya-ismi [dosya-ismi] ...sEBelirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler. +LoadFile dosya-ismi [dosya-ismi] ...skEBelirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler. -LoadModule modül dosya-ismisEBelirtilen nesne dosyasını veya kütüphaneyi sunucu ile ilintiler +LoadModule modül dosya-ismiskEBelirtilen 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. @@ -563,114 +579,122 @@ uygulanır. LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesDPlug an authorization provider function into mod_authz_core -LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]skdhDProvide a hook for the access_checker phase of request processing -LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]skdhDProvide a hook for the auth_checker phase of request processing -LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]skdhDProvide a hook for the check_user_id phase of request processing -LuaHookFixups /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the fixups phase of request +LuaCodeCache stat|forever|never stat skdhDConfigure the compiled code cache. +LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]skdhDProvide a hook for the access_checker phase of request processing +LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]skdhDProvide a hook for the auth_checker phase of request processing +LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]skdhDProvide a hook for the check_user_id phase of request processing +LuaHookFixups /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the fixups phase of a request processing -LuaHookInsertFilter /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the insert_filter phase of request processing -LuaHookMapToStorage /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the map_to_storage phase of request processing -LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]skDProvide a hook for the translate name phase of request processing -LuaHookTypeChecker /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the type_checker phase of request processing -LuaInherit none|parent-first|parent-last parent-first skdhDControls how parent configuration sections are merged into children +LuaHookInsertFilter /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the insert_filter phase of request processing +LuaHookMapToStorage /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the map_to_storage phase of request processing +LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]skDProvide a hook for the translate name phase of request processing +LuaHookTypeChecker /path/to/lua/script.lua hook_function_nameskdhDProvide a hook for the type_checker phase of request processing +LuaInherit none|parent-first|parent-last parent-first skdhDControls how parent configuration sections are merged into children +LuaInputFilter filter_name /path/to/lua/script.lua function_namesDProvide a Lua function for content input filtering +LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]skdhDMap a path to a lua handler +LuaOutputFilter filter_name /path/to/lua/script.lua function_namesDProvide a Lua function for content output filtering LuaPackageCPath /path/to/include/?.soaskdhDAdd a directory to lua's package.cpath LuaPackagePath /path/to/include/?.luaskdhDAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_nameskDProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directoryskdhDSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once skdhDOne of once, request, conn, thread -- default is once -MaxConnectionsPerChild sayı 0 sMTek bir çocuk sürecin ömrü boyunca işleme sokabileceği istek +LuaScope once|request|conn|thread|server [min] [max] once skdhDOne of once, request, conn, thread -- default is once + +<Macro name [par1 .. parN]> +... </Macro>skdTDefine a configuration file macro +MaxConnectionsPerChild sayı 0 sMTek 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ı 2048 sMfree() çağrılmaksızın ana bellek ayırıcının +MaxKeepAliveRequests sayı 100 skÇBir kalıcı bağlantıda izin verilen istek sayısı +MaxMemFree kB-sayısı 2048 sMfree() ç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 | - aralık-sayısı 20 skdÇÖzkaynağın tamamını döndürmeden önce izin verilen üst üste binen +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ı +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ısMAynı anda işleme sokulacak azami bağlantı sayısı -MaxSpareServers sayı 10 sMBoştaki çocuk süreçlerin azami sayısı -MaxSpareThreads numbersMBoştaki azami evre sayısını belirler -MaxThreads number 2048 sMSet the maximum number of worker threads -MetaDir directory .web skdhEName of the directory to find CERN-style meta information +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ısMAynı anda işleme sokulacak azami bağlantı sayısı +MaxSpareServers sayı 10 sMBoştaki çocuk süreçlerin azami sayısı +MaxSpareThreads numbersMBoştaki azami evre sayısını belirler +MaxThreads number 2048 sMSet the maximum number of worker threads +MetaDir directory .web skdhEName of the directory to find CERN-style meta information files -MetaFiles on|off off skdhEActivates CERN meta-file processing -MetaSuffix suffix .meta skdhEFile name suffix for the file containing CERN-style +MetaFiles on|off off skdhEActivates CERN meta-file processing +MetaSuffix suffix .meta skdhEFile name suffix for the file containing CERN-style meta information -MimeMagicFile file-pathskEEnable MIME-type determination based on file contents +MimeMagicFile file-pathskEEnable MIME-type determination based on file contents using the specified magic file -MinSpareServers sayı 5 sMBoştaki çocuk süreçlerin asgari sayısı -MinSpareThreads sayısMİsteklerin ani artışında devreye girecek boştaki evrelerin asgari +MinSpareServers sayı 5 sMBoştaki çocuk süreçlerin asgari sayısı +MinSpareThreads sayısMİsteklerin ani artışında devreye girecek boştaki evrelerin asgari sayısını belirler. -MMapFile file-path [file-path] ...sDMap a list of files into memory at startup time -ModemStandard V.21|V.26bis|V.32|V.92dDModem standard to simulate -ModMimeUsePathInfo On|Off Off dTTells mod_mime to treat path_info +MMapFile file-path [file-path] ...sDMap a list of files into memory at startup time +ModemStandard V.21|V.26bis|V.32|V.92dDModem standard to simulate +ModMimeUsePathInfo On|Off Off dTTells mod_mime to treat path_info components as part of the filename -MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers -[Handlers|Filters] NegotiatedOnly skdhTThe types of files that will be included when searching for +MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers +[Handlers|Filters] NegotiatedOnly skdhTThe types of files that will be included when searching for a matching file with MultiViews -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] ...skEHosts, domains, or networks that will be connected to +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] ...skEHosts, domains, or networks that will be connected to directly -NWSSLTrustedCerts filename [filename] ...sTList of additional client certificates -NWSSLUpgradeable [IP-address:]portnumbersTAllows a connection to be upgraded to an SSL connection upon request -Options - [+|-]seçenek [[+|-]seçenek] ... FollowSymlinks skdhÇBelli bir dizinde geçerli olacak özellikleri yapılandırır. +NWSSLTrustedCerts filename [filename] ...sTList of additional client certificates +NWSSLUpgradeable [IP-address:]portnumbersTAllows a connection to be upgraded to an SSL connection upon request +Options + [+|-]seçenek [[+|-]seçenek] ... FollowSymlinks skdhÇBelli bir dizinde geçerli olacak özellikleri yapılandırır. - Order ordering Deny,Allow dhEControls the default access state and the order in which + Order ordering Deny,Allow dhEControls the default access state and the order in which Allow and Deny are evaluated. -OutputSed sed-commanddhDSed command for filtering response content -PassEnv ortam-değişkeni [ortam-değişkeni] -...skdhTOrtam değişkenlerini kabuktan aktarır. -PidFile dosya logs/httpd.pid sMAna sürecin süreç kimliğinin (PID) kaydedileceği dosyayı belirler. -PrivilegesMode FAST|SECURE|SELECTIVE FAST skdDTrade off processing speed and efficiency vs security against +OutputSed sed-commanddhDSed command for filtering response content +PassEnv ortam-değişkeni [ortam-değişkeni] +...skdhTOrtam değişkenlerini kabuktan aktarır. +PidFile dosya logs/httpd.pid sMAna sürecin süreç kimliğinin (PID) kaydedileceği dosyayı belirler. +PrivilegesMode FAST|SECURE|SELECTIVE FAST skdDTrade off processing speed and efficiency vs security against malicious privileges-aware code. -Protocol protokolskÇDinlenen bir soket için protokol -ProtocolEcho On|Off Off skDTurn the echo server on or off -<Proxy wildcard-url> ...</Proxy>skEContainer for directives applied to proxied resources -ProxyAddHeaders Off|On On skdEAdd proxy information in X-Forwarded-* headers -ProxyBadHeader IsError|Ignore|StartBody IsError skEDetermines how to handle bad header lines in a +Protocol protokolskÇDinlenen bir soket için protokol +ProtocolEcho On|Off Off skDTurn the echo server on or off +<Proxy wildcard-url> ...</Proxy>skEContainer for directives applied to proxied resources +ProxyAddHeaders Off|On On skdEAdd proxy information in X-Forwarded-* headers +ProxyBadHeader IsError|Ignore|StartBody IsError skEDetermines how to handle bad header lines in a response -ProxyBlock *|word|host|domain -[word|host|domain] ...skEWords, hosts, or domains that are banned from being +ProxyBlock *|word|host|domain +[word|host|domain] ...skEWords, hosts, or domains that are banned from being proxied -ProxyDomain DomainskEDefault domain name for proxied requests -ProxyErrorOverride On|Off Off skdEOverride error pages for proxied content -ProxyExpressDBMFile <pathname>skEPathname to DBM file. -ProxyExpressDBMFile <type>skEDBM type of file. -ProxyExpressEnable [on|off]skEEnable the module functionality. -ProxyFtpDirCharset character set ISO-8859-1 skdEDefine the character set for proxied FTP listings -ProxyFtpEscapeWildcards [on|off]skdEWhether wildcards in requested filenames are escaped when sent to the FTP server -ProxyFtpListOnWildcard [on|off]skdEWhether wildcards in requested filenames trigger a file listing -ProxyHTMLBufSize bytesskdTSets the buffer size increment for buffering inline scripts and +ProxyDomain DomainskEDefault domain name for proxied requests +ProxyErrorOverride On|Off Off skdEOverride error pages for proxied content +ProxyExpressDBMFile <pathname>skEPathname to DBM file. +ProxyExpressDBMFile <type>skEDBM type of file. +ProxyExpressEnable [on|off]skEEnable the module functionality. +ProxyFtpDirCharset character set ISO-8859-1 skdEDefine the character set for proxied FTP listings +ProxyFtpEscapeWildcards [on|off]skdEWhether wildcards in requested filenames are escaped when sent to the FTP server +ProxyFtpListOnWildcard [on|off]skdEWhether wildcards in requested filenames trigger a file listing +ProxyHTMLBufSize bytesskdTSets the buffer size increment for buffering inline scripts and stylesheets. -ProxyHTMLCharsetOut Charset | *skdTSpecify a charset for mod_proxy_html output. -ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    skdTSets an HTML or XHTML document type declaration. -ProxyHTMLEnable On|Off Off skdTTurns the proxy_html filter on or off. -ProxyHTMLEvents attribute [attribute ...]skdTSpecify attributes to treat as scripting events. -ProxyHTMLExtended On|Off Off skdTDetermines whether to fix links in inline scripts, stylesheets, +ProxyHTMLCharsetOut Charset | *skdTSpecify a charset for mod_proxy_html output. +ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    skdTSets an HTML or XHTML document type declaration. +ProxyHTMLEnable On|Off Off skdTTurns the proxy_html filter on or off. +ProxyHTMLEvents attribute [attribute ...]skdTSpecify attributes to treat as scripting events. +ProxyHTMLExtended On|Off Off skdTDetermines whether to fix links in inline scripts, stylesheets, and scripting events. -ProxyHTMLFixups [lowercase] [dospath] [reset]skdTFixes for simple HTML errors. -ProxyHTMLInterp On|Off Off skdTEnables per-request interpolation of +ProxyHTMLFixups [lowercase] [dospath] [reset]skdTFixes for simple HTML errors. +ProxyHTMLInterp On|Off Off skdTEnables per-request interpolation of ProxyHTMLURLMap rules. -ProxyHTMLLinks element attribute [attribute2 ...]skdTSpecify HTML elements that have URL attributes to be rewritten. -ProxyHTMLMeta On|Off Off skdTTurns on or off extra pre-parsing of metadata in HTML +ProxyHTMLLinks element attribute [attribute2 ...]skdTSpecify HTML elements that have URL attributes to be rewritten. +ProxyHTMLMeta On|Off Off skdTTurns on or off extra pre-parsing of metadata in HTML <head> sections. -ProxyHTMLStripComments On|Off Off skdTDetermines whether to strip HTML comments. -ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]skdTDefines a rule to rewrite HTML links -ProxyIOBufferSize bytes 8192 skEDetermine size of internal data throughput buffer -<ProxyMatch regex> ...</ProxyMatch>skEContainer for directives applied to regular-expression-matched +ProxyHTMLStripComments On|Off Off skdTDetermines whether to strip HTML comments. +ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]skdTDefines a rule to rewrite HTML links +ProxyIOBufferSize bytes 8192 skEDetermine size of internal data throughput buffer +<ProxyMatch regex> ...</ProxyMatch>skEContainer for directives applied to regular-expression-matched proxied resources -ProxyMaxForwards number -1 skEMaximium number of proxies that a request can be forwarded +ProxyMaxForwards number -1 skEMaximium number of proxies that a request can be forwarded through -ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate] [noquery]skdEMaps remote servers into the local server URL-space +ProxyPass [path] !|url [key=value + [key=value ...]] [nocanon] [interpolate] [noquery]skdEMaps remote servers into the local server URL-space +ProxyPassInherit On|Off On skEInherit ProxyPass directives defined from the main server ProxyPassInterpolateEnv On|Off Off skdEEnable Environment Variable interpolation in Reverse Proxy configurations ProxyPassMatch [regex] !|url [key=value [key=value ...]]skdEMaps remote servers into the local server URL-space using regular expressions @@ -780,7 +804,7 @@ must succeed for the enclosing directive to not fail. sayısına sınırlama getirir. Satisfy Any|All All dhEInteraction 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-scriptskdTActivates a CGI script for a particular request method. @@ -909,115 +933,121 @@ Remote Server Auth Remote Server Auth SSLProxyCARevocationPath directory-pathskEDirectory of PEM-encoded CA CRLs for Remote Server Auth -SSLProxyCheckPeerCN on|off on skEWhether to check the remote server certificates CN field +SSLProxyCheckPeerCN on|off on skEWhether to check the remote server certificate's CN field SSLProxyCheckPeerExpire on|off on skEWhether to check if remote server certificate is expired -SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +skdhECipher Suite available for negotiation in SSL +SSLProxyCheckPeerName on|off on skEConfigure host name checking for remote server certificates + +SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +skdhECipher Suite available for negotiation in SSL proxy handshake -SSLProxyEngine on|off off skESSL Proxy Engine Operation Switch -SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate -SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy -SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy -SSLProxyProtocol [+|-]protocol ... all skEConfigure usable SSL protocol flavors for proxy usage -SSLProxyVerify level none skEType of remote server Certificate verification -SSLProxyVerifyDepth number 1 skEMaximum depth of CA Certificates in Remote Server +SSLProxyEngine on|off off skESSL Proxy Engine Operation Switch +SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate +SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy +SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy +SSLProxyProtocol [+|-]protocol ... all skEConfigure usable SSL protocol flavors for proxy usage +SSLProxyVerify level none skEType of remote server Certificate verification +SSLProxyVerifyDepth number 1 skEMaximum depth of CA Certificates in Remote Server Certificate verification -SSLRandomSeed context source -[bytes]sEPseudo Random Number Generator (PRNG) seeding +SSLRandomSeed context source +[bytes]sEPseudo Random Number Generator (PRNG) seeding source -SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer -SSLRequire expressiondhEAllow access only when an arbitrarily complex +SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer +SSLRequire expressiondhEAllow access only when an arbitrarily complex boolean expression is true -SSLRequireSSLdhEDeny access when SSL is not used for the +SSLRequireSSLdhEDeny access when SSL is not used for the HTTP request -SSLSessionCache type none sEType of the global/inter-process SSL Session +SSLSessionCache type none sEType of the global/inter-process SSL Session Cache -SSLSessionCacheTimeout seconds 300 skENumber of seconds before an SSL session expires +SSLSessionCacheTimeout seconds 300 skENumber of seconds before an SSL session expires in the Session Cache -SSLSessionTicketKeyFile file-pathskEPersistent encryption/decryption key for TLS session tickets -SSLSRPUnknownUserSeed secret-stringskESRP unknown user seed -SSLSRPVerifierFile file-pathskEPath to SRP verifier file -SSLStaplingCache typesEConfigures the OCSP stapling cache -SSLStaplingErrorCacheTimeout seconds 600 skENumber of seconds before expiring invalid responses in the OCSP stapling cache -SSLStaplingFakeTryLater on|off on skESynthesize "tryLater" responses for failed OCSP stapling queries -SSLStaplingForceURL uriskEOverride the OCSP responder URI specified in the certificate's AIA extension -SSLStaplingResponderTimeout seconds 10 skETimeout for OCSP stapling queries -SSLStaplingResponseMaxAge seconds -1 skEMaximum allowable age for OCSP stapling responses -SSLStaplingResponseTimeSkew seconds 300 skEMaximum allowable time skew for OCSP stapling response validation -SSLStaplingReturnResponderErrors on|off on skEPass stapling related OCSP errors on to client -SSLStaplingStandardCacheTimeout seconds 3600 skENumber of seconds before expiring responses in the OCSP stapling cache -SSLStrictSNIVHostCheck on|off off skEWhether to allow non-SNI clients to access a name-based virtual +SSLSessionTicketKeyFile file-pathskEPersistent encryption/decryption key for TLS session tickets +SSLSRPUnknownUserSeed secret-stringskESRP unknown user seed +SSLSRPVerifierFile file-pathskEPath to SRP verifier file +SSLStaplingCache typesEConfigures the OCSP stapling cache +SSLStaplingErrorCacheTimeout seconds 600 skENumber of seconds before expiring invalid responses in the OCSP stapling cache +SSLStaplingFakeTryLater on|off on skESynthesize "tryLater" responses for failed OCSP stapling queries +SSLStaplingForceURL uriskEOverride the OCSP responder URI specified in the certificate's AIA extension +SSLStaplingResponderTimeout seconds 10 skETimeout for OCSP stapling queries +SSLStaplingResponseMaxAge seconds -1 skEMaximum allowable age for OCSP stapling responses +SSLStaplingResponseTimeSkew seconds 300 skEMaximum allowable time skew for OCSP stapling response validation +SSLStaplingReturnResponderErrors on|off on skEPass stapling related OCSP errors on to client +SSLStaplingStandardCacheTimeout seconds 3600 skENumber of seconds before expiring responses in the OCSP stapling cache +SSLStrictSNIVHostCheck on|off off skEWhether to allow non-SNI clients to access a name-based virtual host. -SSLUserName varnamesdhEVariable name to determine user name -SSLUseStapling on|off off skEEnable stapling of OCSP responses in the TLS handshake -SSLVerifyClient level none skdhEType of Client Certificate verification -SSLVerifyDepth number 1 skdhEMaximum depth of CA Certificates in Client +SSLUserName varnamesdhEVariable name to determine user name +SSLUseStapling on|off off skEEnable stapling of OCSP responses in the TLS handshake +SSLVerifyClient level none skdhEType of Client Certificate verification +SSLVerifyDepth number 1 skdhEMaximum depth of CA Certificates in Client Certificate verification -StartServers sayısMSunucunun başlatılması sırasında oluşturulan çocuk süreçlerin +StartServers sayısMSunucunun başlatılması sırasında oluşturulan çocuk süreçlerin sayısını belirler. -StartThreads sayısMSunucunun başlatılması sırasında oluşturulan evrelerin sayısını +StartThreads sayısMSunucunun başlatılması sırasında oluşturulan evrelerin sayısını belirler. -Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content -Suexec On|OffsTsuEXEC özelliğini etkin veya etkisiz yapar -SuexecUserGroup Kullanıcı GrupskECGI betiklerini çalıştıracak kullanıcı ve grup belirtilir. +Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content +Suexec On|OffsTsuEXEC özelliğini etkin veya etkisiz yapar +SuexecUserGroup Kullanıcı GrupskECGI 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ı +ThreadLimit sayısMÇocuk süreç başına ayarlanabilir evre sayısının üst sınırını belirler. -ThreadsPerChild sayısMHer çocuk süreç tarafından oluşturulan evrelerin sayısını +ThreadsPerChild sayısMHer ç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 +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 +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 skÇTRACE isteklerinde davranış şeklini belirler +TraceEnable [on|off|extended] on skÇTRACE isteklerinde davranış şeklini belirler -TransferLog dosya|borulu-süreç -[takma-ad]skTBir günlük dosyasının yerini belirtir. -TypesConfig file-path conf/mime.types sTThe location of the mime.types file -UnDefine değişken-ismisÇBir değişkeni tanımsız yapar +TransferLog dosya|borulu-süreç +[takma-ad]skTBir günlük dosyasının yerini belirtir. +TypesConfig file-path conf/mime.types sTThe location of the mime.types file +UnDefine değişken-ismisÇBir değişkeni tanımsız yapar +UndefMacro nameskdTUndefine a macro UnsetEnv ortam-değişkeni [ortam-değişkeni] ...skdhTOrtamdaki değişkenleri tanımsız hale getirir. -UseCanonicalName On|Off|DNS Off skdÇSunucunun kendi adını ve portunu nasıl belirleyeceğini ayarlar +Use name [value1 ... valueN] +skdTUse 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 +UseCanonicalPhysicalPort On|Off Off skdÇSunucunun kendi adını ve portunu nasıl belirleyeceğini ayarlar -User unix-kullanıcısı #-1 sTİsteklere yanıt verecek sunucunun ait olacağı kullanıcıyı +User unix-kullanıcısı #-1 sTİsteklere yanıt verecek sunucunun ait olacağı kullanıcıyı belirler. -UserDir dizin [dizin] ...skTKullanıcıya özel dizinlerin yeri -VHostCGIMode On|Off|Secure On kDDetermines whether the virtualhost can run +UserDir dizin [dizin] ...skTKullanıcıya özel dizinlerin yeri +VHostCGIMode On|Off|Secure On kDDetermines whether the virtualhost can run subprocesses, and the privileges available to subprocesses. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...kDAssign arbitrary privileges to subprocesses created +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...kDAssign arbitrary privileges to subprocesses created by a virtual host. -VHostGroup unix-groupidkDSets the Group ID under which a virtual host runs. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...kDAssign arbitrary privileges to a virtual host. -VHostSecure On|Off On kDDetermines whether the server runs with enhanced security +VHostGroup unix-groupidkDSets the Group ID under which a virtual host runs. +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...kDAssign arbitrary privileges to a virtual host. +VHostSecure On|Off On kDDetermines whether the server runs with enhanced security for the virtualhost. -VHostUser unix-useridkDSets the User ID under which a virtual host runs. -VirtualDocumentRoot hesaplanan-dizin|none none skEBir sanal konağın belge kök dizinini devingen olarak yapılandırır. +VHostUser unix-useridkDSets the User ID under which a virtual host runs. +VirtualDocumentRoot hesaplanan-dizin|none none skEBir sanal konağın belge kök dizinini devingen olarak yapılandırır. -VirtualDocumentRootIP hesaplanan-dizin|none none skEBir sanal konağın belge kök dizinini devingen olarak yapılandırır. +VirtualDocumentRootIP hesaplanan-dizin|none none skEBir sanal konağın belge kök dizinini devingen olarak yapılandırır. -<VirtualHost +<VirtualHost adres[:port] [adres[:port]] - ...> ... </VirtualHost>sÇSadece belli bir konak ismine ve porta uygulanacak yönergeleri barındırır. -VirtualScriptAlias hesaplanan-dizin|none none skEBir sanal konağın CGI dizinini devingen olarak yapılandırır. + ...> ... </VirtualHost>sÇSadece belli bir konak ismine ve porta uygulanacak yönergeleri barındırır. +VirtualScriptAlias hesaplanan-dizin|none none skEBir sanal konağın CGI dizinini devingen olarak yapılandırır. -VirtualScriptAliasIP hesaplanan-dizin|none none skEBir sanal konağın CGI dizinini devingen olarak yapılandırır. +VirtualScriptAliasIP hesaplanan-dizin|none none skEBir sanal konağın CGI dizinini devingen olarak yapılandırır. -WatchdogInterval number-of-seconds 1 sTWatchdog interval in seconds -XBitHack on|off|full off skdhTParse SSI directives in files with the execute bit +WatchdogInterval number-of-seconds 1 sTWatchdog interval in seconds +XBitHack on|off|full off skdhTParse SSI directives in files with the execute bit set -xml2EncAlias charset alias [alias ...]sTRecognise Aliases for encoding values -xml2EncDefault nameskdhTSets a default encoding to assume when absolutely no information +xml2EncAlias charset alias [alias ...]sTRecognise Aliases for encoding values +xml2EncDefault nameskdhTSets a default encoding to assume when absolutely no information can be automatically detected -xml2StartParse element [element ...]skdhTAdvise the parser to skip leading junk. +xml2StartParse element [element ...]skdhTAdvise the parser to skip leading junk.

    Mevcut Diller:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | diff --git a/docs/manual/mod/quickreference.html.zh-cn b/docs/manual/mod/quickreference.html.zh-cn index 51bb198e..81830041 100644 --- a/docs/manual/mod/quickreference.html.zh-cn +++ b/docs/manual/mod/quickreference.html.zh-cn @@ -26,6 +26,7 @@

    可用语言:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | @@ -137,110 +138,113 @@ formatted email address AsyncRequestWorkerFactor factorsMLimit concurrent connections per process AuthBasicAuthoritative On|Off On dhBSets whether authorization and authentication are passed to lower level modules -AuthBasicProvider provider-name -[provider-name] ... file dhBSets the authentication provider(s) for this location -AuthDBDUserPWQuery querydESQL query to look up a password for a user -AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. +AuthBasicFake off|username [password]dhBFake basic authentication using the given expressions for +username and password +AuthBasicProvider provider-name +[provider-name] ... file dhBSets the authentication provider(s) for this location +AuthDBDUserPWQuery querydESQL query to look up a password for a user +AuthDBDUserRealmQuery querydESQL query to look up a password hash for a user and realm. -AuthDBMGroupFile file-pathdhESets the name of the database file containing the list +AuthDBMGroupFile file-pathdhESets the name of the database file containing the list of user groups for authorization -AuthDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to +AuthDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to store passwords -AuthDBMUserFile file-pathdhESets the name of a database file containing the list of users and +AuthDBMUserFile file-pathdhESets the name of a database file containing the list of users and passwords for authentication -AuthDigestAlgorithm MD5|MD5-sess MD5 dhESelects the algorithm used to calculate the challenge and +AuthDigestAlgorithm MD5|MD5-sess MD5 dhESelects the algorithm used to calculate the challenge and response hashes in digest authentication -AuthDigestDomain URI [URI] ...dhEURIs that are in the same protection space for digest +AuthDigestDomain URI [URI] ...dhEURIs that are in the same protection space for digest authentication -AuthDigestNonceLifetime seconds 300 dhEHow long the server nonce is valid -AuthDigestProvider provider-name -[provider-name] ... file dhESets the authentication provider(s) for this location -AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhEDetermines the quality-of-protection to use in digest +AuthDigestNonceLifetime seconds 300 dhEHow long the server nonce is valid +AuthDigestProvider provider-name +[provider-name] ... file dhESets the authentication provider(s) for this location +AuthDigestQop none|auth|auth-int [auth|auth-int] auth dhEDetermines the quality-of-protection to use in digest authentication -AuthDigestShmemSize size 1000 sEThe amount of shared memory to allocate for keeping track +AuthDigestShmemSize size 1000 sEThe amount of shared memory to allocate for keeping track of clients -AuthFormAuthoritative On|Off On dhBSets whether authorization and authentication are passed to +AuthFormAuthoritative On|Off On dhBSets whether authorization and authentication are passed to lower level modules -AuthFormBody fieldnamedBThe name of a form field carrying the body of the request to attempt on successful login -AuthFormDisableNoStore On|Off Off dBDisable the CacheControl no-store header on the login page -AuthFormFakeBasicAuth On|Off Off dBFake a Basic Authentication header -AuthFormLocation fieldnamedBThe name of a form field carrying a URL to redirect to on successful login -AuthFormLoginRequiredLocation urldBThe URL of the page to be redirected to should login be required -AuthFormLoginSuccessLocation urldBThe URL of the page to be redirected to should login be successful -AuthFormLogoutLocation uridBThe URL to redirect to after a user has logged out -AuthFormMethod fieldnamedBThe name of a form field carrying the method of the request to attempt on successful login -AuthFormMimetype fieldnamedBThe name of a form field carrying the mimetype of the body of the request to attempt on successful login -AuthFormPassword fieldnamedBThe name of a form field carrying the login password -AuthFormProvider provider-name -[provider-name] ... file dhBSets the authentication provider(s) for this location -AuthFormSitePassphrase secretdBBypass authentication checks for high traffic sites -AuthFormSize sizedBThe largest size of the form in bytes that will be parsed for the login details -AuthFormUsername fieldnamedBThe name of a form field carrying the login username -AuthGroupFile file-pathdhBSets the name of a text file containing the list +AuthFormBody fieldnamedBThe name of a form field carrying the body of the request to attempt on successful login +AuthFormDisableNoStore On|Off Off dBDisable the CacheControl no-store header on the login page +AuthFormFakeBasicAuth On|Off Off dBFake a Basic Authentication header +AuthFormLocation fieldnamedBThe name of a form field carrying a URL to redirect to on successful login +AuthFormLoginRequiredLocation urldBThe URL of the page to be redirected to should login be required +AuthFormLoginSuccessLocation urldBThe URL of the page to be redirected to should login be successful +AuthFormLogoutLocation uridBThe URL to redirect to after a user has logged out +AuthFormMethod fieldnamedBThe name of a form field carrying the method of the request to attempt on successful login +AuthFormMimetype fieldnamedBThe name of a form field carrying the mimetype of the body of the request to attempt on successful login +AuthFormPassword fieldnamedBThe name of a form field carrying the login password +AuthFormProvider provider-name +[provider-name] ... file dhBSets the authentication provider(s) for this location +AuthFormSitePassphrase secretdBBypass authentication checks for high traffic sites +AuthFormSize sizedBThe largest size of the form in bytes that will be parsed for the login details +AuthFormUsername fieldnamedBThe name of a form field carrying the login username +AuthGroupFile file-pathdhBSets the name of a text file containing the list of user groups for authorization -AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during +AuthLDAPAuthorizePrefix prefix AUTHORIZE_ dhESpecifies the prefix for environment variables set during authorization -AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server -AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN -AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file -AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons -AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs -AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases -AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of +AuthLDAPBindAuthoritativeoff|on on dhEDetermines 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-namedhEOptional DN to use in binding to the LDAP server +AuthLDAPBindPassword passworddhEPassword used in conjuction with the bind DN +AuthLDAPCharsetConfig file-pathsELanguage to charset conversion configuration file +AuthLDAPCompareAsUser on|off off dhEUse the authenticated user's credentials to perform authorization comparisons +AuthLDAPCompareDNOnServer on|off on dhEUse the LDAP server to compare the DNs +AuthLDAPDereferenceAliases never|searching|finding|always always dhEWhen will the module de-reference aliases +AuthLDAPGroupAttribute attribute member uniquemember +dhELDAP attributes used to identify the user members of groups. -AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for +AuthLDAPGroupAttributeIsDN on|off on dhEUse the DN of the client username when checking for group membership -AuthLDAPInitialBindAsUser off|on off dhEDetermines if the server does the initial DN lookup using the basic authentication users' +AuthLDAPInitialBindAsUser off|on off dhEDetermines 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 +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server +AuthLDAPInitialBindPatternregex substitution (.*) $1 (remote use +dhESpecifies the transformation of the basic authentication username to be used when binding to the LDAP server to perform a DN lookup -AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be +AuthLDAPMaxSubGroupDepth Number 10 dhESpecifies the maximum sub-group nesting depth that will be evaluated before the user search is discontinued. -AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user +AuthLDAPRemoteUserAttribute uiddhEUse the value of the attribute returned during the user query to set the REMOTE_USER environment variable -AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER +AuthLDAPRemoteUserIsDN on|off off dhEUse the DN of the client username to set the REMOTE_USER environment variable -AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches -AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per +AuthLDAPSearchAsUser on|off off dhEUse the authenticated user's credentials to perform authorization searches +AuthLDAPSubGroupAttribute attributedhESpecifies the attribute labels, one value per directive line, used to distinguish the members of the current group that are groups. -AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory +AuthLDAPSubGroupClass LdapObjectClass groupOfNames groupO +dhESpecifies which LDAP objectClass values identify directory objects that are groups during sub-group processing. -AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters -AuthMerging Off | And | Or Off dhBControls the manner in which each configuration section's +AuthLDAPUrl url [NONE|SSL|TLS|STARTTLS]dhEURL specifying the LDAP search parameters +AuthMerging Off | And | Or Off dhBControls the manner in which each configuration section's authorization logic is combined with that of preceding configuration sections. -AuthName auth-domaindhBAuthorization realm for use in HTTP +AuthName auth-domaindhBAuthorization realm for use in HTTP authentication -AuthnCacheContext directory|server|custom-stringdBSpecify a context string for use in the cache key -AuthnCacheEnablesBEnable Authn caching configured anywhere -AuthnCacheProvideFor authn-provider [...]dhBSpecify which authn provider(s) to cache for -AuthnCacheSOCache provider-namesBSelect socache backend provider to use -AuthnCacheTimeout timeout (seconds)dhBSet a timeout for cache entries -<AuthnProviderAlias baseProvider Alias> -... </AuthnProviderAlias>sBEnclose a group of directives that represent an +AuthnCacheContext directory|server|custom-stringdBSpecify a context string for use in the cache key +AuthnCacheEnablesBEnable Authn caching configured anywhere +AuthnCacheProvideFor authn-provider [...]dhBSpecify which authn provider(s) to cache for +AuthnCacheSOCache provider-namesBSelect socache backend provider to use +AuthnCacheTimeout timeout (seconds)dhBSet a timeout for cache entries +<AuthnProviderAlias baseProvider Alias> +... </AuthnProviderAlias>sBEnclose a group of directives that represent an extension of a base authentication provider and referenced by the specified alias -AuthType None|Basic|Digest|FormdhBType of user authentication -AuthUserFile file-pathdhBSets the name of a text file containing the list of users and +AuthType None|Basic|Digest|FormdhBType of user authentication +AuthUserFile file-pathdhBSets the name of a text file containing the list of users and passwords for authentication -AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring +AuthzDBDLoginToReferer On|Off Off dEDetermines whether to redirect the Client to the Referring page on successful login or logout if a Referer request header is present -AuthzDBDQuery querydESpecify the SQL Query for the required operation -AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user -AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to +AuthzDBDQuery querydESpecify the SQL Query for the required operation +AuthzDBDRedirectQuery querydESpecify a query to look up a login page for the user +AuthzDBMType default|SDBM|GDBM|NDBM|DB default dhESets the type of database file that is used to store list of user groups -<AuthzProviderAlias baseProvider Alias Require-Parameters> +<AuthzProviderAlias baseProvider Alias Require-Parameters> ... </AuthzProviderAlias> -sBEnclose a group of directives that represent an +sBEnclose a group of directives that represent an extension of a base authorization provider and referenced by the specified alias -AuthzSendForbiddenOnFailure On|Off Off dhBSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if +AuthzSendForbiddenOnFailure On|Off Off dhBSend '403 FORBIDDEN' instead of '401 UNAUTHORIZED' if authentication succeeds but authorization fails -BalancerGrowth # 5 svENumber of additional Balancers that can be added Post-configuration +BalancerGrowth # 5 svENumber of additional Balancers that can be added Post-configuration +BalancerInherit On|Off On svEInherit ProxyPassed Balancers/Workers from the main server BalancerMember [balancerurl] url [key=value [key=value ...]]dEAdd a member to a load balancing group BalancerPersist On|Off Off svEAttempt to persist changes made by the Balancer Manager across restarts. BrowserMatch regex [!]env-variable[=value] @@ -290,6 +294,18 @@ cached by proxy servers before data is sent downstream CacheRoot directorysvEThe directory root under which cache files are stored +CacheSocache type[:args]svEThe directory root under which cache files are +stored +CacheSocacheMaxSize bytes 102400 svdhEThe maximum size (in bytes) of an entry to be placed in the +cache +CacheSocacheMaxTime seconds 86400 svdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheMinTime seconds 600 svdhEThe maximum time (in seconds) for a document to be placed in the +cache +CacheSocacheReadSize bytes 0 svdhEThe minimum size (in bytes) of the document to read and be cached + before sending the data downstream +CacheSocacheReadTime milliseconds 0 svdhEThe minimum time (in milliseconds) that should elapse while reading + before data is sent downstream CacheStaleOnError on|off on svdhEServe stale content in place of 5xx responses. CacheStoreExpired On|Off Off svdhEAttempt to cache responses that the server reports as expired CacheStoreNoStore On|Off Off svdhEAttempt to cache requests or responses that have been marked as no-store. @@ -557,117 +573,125 @@ matching URLs LuaAuthzProvider provider_name /path/to/lua/script.lua function_namesXPlug an authorization provider function into mod_authz_core -LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the access_checker phase of request processing -LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the auth_checker phase of request processing -LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the check_user_id phase of request processing -LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the fixups phase of request +LuaCodeCache stat|forever|never stat svdhXConfigure the compiled code cache. +LuaHookAccessChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the access_checker phase of request processing +LuaHookAuthChecker /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the auth_checker phase of request processing +LuaHookCheckUserID /path/to/lua/script.lua hook_function_name [early|late]svdhXProvide a hook for the check_user_id phase of request processing +LuaHookFixups /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the fixups phase of a request processing -LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the insert_filter phase of request processing -LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the map_to_storage phase of request processing -LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svXProvide a hook for the translate name phase of request processing -LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the type_checker phase of request processing -LuaInherit none|parent-first|parent-last parent-first svdhXControls how parent configuration sections are merged into children +LuaHookInsertFilter /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the insert_filter phase of request processing +LuaHookMapToStorage /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the map_to_storage phase of request processing +LuaHookTranslateName /path/to/lua/script.lua hook_function_name [early|late]svXProvide a hook for the translate name phase of request processing +LuaHookTypeChecker /path/to/lua/script.lua hook_function_namesvdhXProvide a hook for the type_checker phase of request processing +LuaInherit none|parent-first|parent-last parent-first svdhXControls how parent configuration sections are merged into children +LuaInputFilter filter_name /path/to/lua/script.lua function_namesXProvide a Lua function for content input filtering +LuaMapHandler uri-pattern /path/to/lua/script.lua [function-name]svdhXMap a path to a lua handler +LuaOutputFilter filter_name /path/to/lua/script.lua function_namesXProvide a Lua function for content output filtering LuaPackageCPath /path/to/include/?.soasvdhXAdd a directory to lua's package.cpath LuaPackagePath /path/to/include/?.luasvdhXAdd a directory to lua's package.path LuaQuickHandler /path/to/script.lua hook_function_namesvXProvide a hook for the quick handler of request processing LuaRoot /path/to/a/directorysvdhXSpecify the base path for resolving relative paths for mod_lua directives -LuaScope once|request|conn|thread once svdhXOne of once, request, conn, thread -- default is once -MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server +LuaScope once|request|conn|thread|server [min] [max] once svdhXOne of once, request, conn, thread -- default is once + +<Macro name [par1 .. parN]> +... </Macro>svdBDefine a configuration file macro +MaxConnectionsPerChild number 0 sMLimit on the number of connections that an individual child server will handle during its life -MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent +MaxKeepAliveRequests number 100 svCNumber of requests allowed on a persistent connection -MaxMemFree KBytes 2048 sMMaximum amount of memory that the main allocator is allowed +MaxMemFree KBytes 2048 sMMaximum amount of memory that the main allocator is allowed to hold without calling free() -MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdCNumber of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete +MaxRangeOverlaps default | unlimited | none | number-of-ranges 20 svdCNumber of overlapping ranges (eg: 100-200,150-300) allowed before returning the complete resource -MaxRangeReversals default | unlimited | none | number-of-ranges 20 svdCNumber of range reversals (eg: 100-200,50-70) allowed before returning the complete +MaxRangeReversals default | unlimited | none | number-of-ranges 20 svdCNumber of range reversals (eg: 100-200,50-70) allowed before returning the complete resource -MaxRanges default | unlimited | none | number-of-ranges 200 svdCNumber of ranges allowed before returning the complete +MaxRanges default | unlimited | none | number-of-ranges 200 svdCNumber of ranges allowed before returning the complete resource -MaxRequestWorkers numbersMMaximum number of connections that will be processed +MaxRequestWorkers numbersMMaximum number of connections that will be processed simultaneously -MaxSpareServers number 10 sMMaximum number of idle child server processes -MaxSpareThreads numbersMMaximum number of idle threads -MaxThreads number 2048 sMSet the maximum number of worker threads -MetaDir directory .web svdhEName of the directory to find CERN-style meta information +MaxSpareServers number 10 sMMaximum number of idle child server processes +MaxSpareThreads numbersMMaximum number of idle threads +MaxThreads number 2048 sMSet the maximum number of worker threads +MetaDir directory .web svdhEName of the directory to find CERN-style meta information files -MetaFiles on|off off svdhEActivates CERN meta-file processing -MetaSuffix suffix .meta svdhEFile name suffix for the file containing CERN-style +MetaFiles on|off off svdhEActivates CERN meta-file processing +MetaSuffix suffix .meta svdhEFile name suffix for the file containing CERN-style meta information -MimeMagicFile file-pathsvEEnable MIME-type determination based on file contents +MimeMagicFile file-pathsvEEnable MIME-type determination based on file contents using the specified magic file -MinSpareServers number 5 sMMinimum number of idle child server processes -MinSpareThreads numbersMMinimum number of idle threads available to handle request +MinSpareServers number 5 sMMinimum number of idle child server processes +MinSpareThreads numbersMMinimum number of idle threads available to handle request spikes -MMapFile file-path [file-path] ...sXMap a list of files into memory at startup time -ModemStandard V.21|V.26bis|V.32|V.92dXModem standard to simulate -ModMimeUsePathInfo On|Off Off dBTells mod_mime to treat path_info +MMapFile file-path [file-path] ...sXMap a list of files into memory at startup time +ModemStandard V.21|V.26bis|V.32|V.92dXModem standard to simulate +ModMimeUsePathInfo On|Off Off dBTells mod_mime to treat path_info components as part of the filename -MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers -[Handlers|Filters] NegotiatedOnly svdhBThe types of files that will be included when searching for +MultiviewsMatch Any|NegotiatedOnly|Filters|Handlers +[Handlers|Filters] NegotiatedOnly svdhBThe types of files that will be included when searching for a matching file with MultiViews -Mutex mechanism [default|mutex-name] ... [OmitPID] default sCConfigures mutex mechanism and lock file directory for all +Mutex mechanism [default|mutex-name] ... [OmitPID] default sCConfigures mutex mechanism and lock file directory for all or specified mutexes -NameVirtualHost addr[:port]sCDEPRECATED: Designates an IP address for name-virtual +NameVirtualHost addr[:port]sCDEPRECATED: Designates an IP address for name-virtual hosting -NoProxy host [host] ...svEHosts, domains, or networks that will be connected to +NoProxy host [host] ...svEHosts, domains, or networks that will be connected to directly -NWSSLTrustedCerts filename [filename] ...sBList of additional client certificates -NWSSLUpgradeable [IP-address:]portnumbersBAllows a connection to be upgraded to an SSL connection upon request -Options - [+|-]option [[+|-]option] ... FollowSymlinks svdhCConfigures what features are available in a particular +NWSSLTrustedCerts filename [filename] ...sBList of additional client certificates +NWSSLUpgradeable [IP-address:]portnumbersBAllows a connection to be upgraded to an SSL connection upon request +Options + [+|-]option [[+|-]option] ... FollowSymlinks svdhCConfigures what features are available in a particular directory - Order ordering Deny,Allow dhEControls the default access state and the order in which + Order ordering Deny,Allow dhEControls the default access state and the order in which Allow and Deny are evaluated. -OutputSed sed-commanddhXSed command for filtering response content -PassEnv env-variable [env-variable] -...svdhBPasses environment variables from the shell -PidFile filename logs/httpd.pid sMFile where the server records the process ID +OutputSed sed-commanddhXSed command for filtering response content +PassEnv env-variable [env-variable] +...svdhBPasses environment variables from the shell +PidFile filename logs/httpd.pid sMFile where the server records the process ID of the daemon -PrivilegesMode FAST|SECURE|SELECTIVE FAST svdXTrade off processing speed and efficiency vs security against +PrivilegesMode FAST|SECURE|SELECTIVE FAST svdXTrade off processing speed and efficiency vs security against malicious privileges-aware code. -Protocol protocolsvCProtocol for a listening socket -ProtocolEcho On|Off Off svXTurn the echo server on or off -<Proxy wildcard-url> ...</Proxy>svEContainer for directives applied to proxied resources -ProxyAddHeaders Off|On On svdEAdd proxy information in X-Forwarded-* headers -ProxyBadHeader IsError|Ignore|StartBody IsError svEDetermines how to handle bad header lines in a +Protocol protocolsvCProtocol for a listening socket +ProtocolEcho On|Off Off svXTurn the echo server on or off +<Proxy wildcard-url> ...</Proxy>svEContainer for directives applied to proxied resources +ProxyAddHeaders Off|On On svdEAdd proxy information in X-Forwarded-* headers +ProxyBadHeader IsError|Ignore|StartBody IsError svEDetermines how to handle bad header lines in a response -ProxyBlock *|word|host|domain -[word|host|domain] ...svEWords, hosts, or domains that are banned from being +ProxyBlock *|word|host|domain +[word|host|domain] ...svEWords, hosts, or domains that are banned from being proxied -ProxyDomain DomainsvEDefault domain name for proxied requests -ProxyErrorOverride On|Off Off svdEOverride error pages for proxied content -ProxyExpressDBMFile <pathname>svEPathname to DBM file. -ProxyExpressDBMFile <type>svEDBM type of file. -ProxyExpressEnable [on|off]svEEnable the module functionality. -ProxyFtpDirCharset character set ISO-8859-1 svdEDefine the character set for proxied FTP listings -ProxyFtpEscapeWildcards [on|off]svdEWhether wildcards in requested filenames are escaped when sent to the FTP server -ProxyFtpListOnWildcard [on|off]svdEWhether wildcards in requested filenames trigger a file listing -ProxyHTMLBufSize bytessvdBSets the buffer size increment for buffering inline scripts and +ProxyDomain DomainsvEDefault domain name for proxied requests +ProxyErrorOverride On|Off Off svdEOverride error pages for proxied content +ProxyExpressDBMFile <pathname>svEPathname to DBM file. +ProxyExpressDBMFile <type>svEDBM type of file. +ProxyExpressEnable [on|off]svEEnable the module functionality. +ProxyFtpDirCharset character set ISO-8859-1 svdEDefine the character set for proxied FTP listings +ProxyFtpEscapeWildcards [on|off]svdEWhether wildcards in requested filenames are escaped when sent to the FTP server +ProxyFtpListOnWildcard [on|off]svdEWhether wildcards in requested filenames trigger a file listing +ProxyHTMLBufSize bytessvdBSets the buffer size increment for buffering inline scripts and stylesheets. -ProxyHTMLCharsetOut Charset | *svdBSpecify a charset for mod_proxy_html output. -ProxyHTMLDocType HTML|XHTML [Legacy]
    OR -
    ProxyHTMLDocType fpi [SGML|XML]
    svdBSets an HTML or XHTML document type declaration. -ProxyHTMLEnable On|Off Off svdBTurns the proxy_html filter on or off. -ProxyHTMLEvents attribute [attribute ...]svdBSpecify attributes to treat as scripting events. -ProxyHTMLExtended On|Off Off svdBDetermines whether to fix links in inline scripts, stylesheets, +ProxyHTMLCharsetOut Charset | *svdBSpecify a charset for mod_proxy_html output. +ProxyHTMLDocType HTML|XHTML [Legacy]
    OR +
    ProxyHTMLDocType fpi [SGML|XML]
    svdBSets an HTML or XHTML document type declaration. +ProxyHTMLEnable On|Off Off svdBTurns the proxy_html filter on or off. +ProxyHTMLEvents attribute [attribute ...]svdBSpecify attributes to treat as scripting events. +ProxyHTMLExtended On|Off Off svdBDetermines whether to fix links in inline scripts, stylesheets, and scripting events. -ProxyHTMLFixups [lowercase] [dospath] [reset]svdBFixes for simple HTML errors. -ProxyHTMLInterp On|Off Off svdBEnables per-request interpolation of +ProxyHTMLFixups [lowercase] [dospath] [reset]svdBFixes for simple HTML errors. +ProxyHTMLInterp On|Off Off svdBEnables per-request interpolation of ProxyHTMLURLMap rules. -ProxyHTMLLinks element attribute [attribute2 ...]svdBSpecify HTML elements that have URL attributes to be rewritten. -ProxyHTMLMeta On|Off Off svdBTurns on or off extra pre-parsing of metadata in HTML +ProxyHTMLLinks element attribute [attribute2 ...]svdBSpecify HTML elements that have URL attributes to be rewritten. +ProxyHTMLMeta On|Off Off svdBTurns on or off extra pre-parsing of metadata in HTML <head> sections. -ProxyHTMLStripComments On|Off Off svdBDetermines whether to strip HTML comments. -ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdBDefines a rule to rewrite HTML links -ProxyIOBufferSize bytes 8192 svEDetermine size of internal data throughput buffer -<ProxyMatch regex> ...</ProxyMatch>svEContainer for directives applied to regular-expression-matched +ProxyHTMLStripComments On|Off Off svdBDetermines whether to strip HTML comments. +ProxyHTMLURLMap from-pattern to-pattern [flags] [cond]svdBDefines a rule to rewrite HTML links +ProxyIOBufferSize bytes 8192 svEDetermine size of internal data throughput buffer +<ProxyMatch regex> ...</ProxyMatch>svEContainer for directives applied to regular-expression-matched proxied resources -ProxyMaxForwards number -1 svEMaximium number of proxies that a request can be forwarded +ProxyMaxForwards number -1 svEMaximium number of proxies that a request can be forwarded through -ProxyPass [path] !|url [key=value - [key=value ...]] [nocanon] [interpolate] [noquery]svdEMaps remote servers into the local server URL-space +ProxyPass [path] !|url [key=value + [key=value ...]] [nocanon] [interpolate] [noquery]svdEMaps remote servers into the local server URL-space +ProxyPassInherit On|Off On svEInherit ProxyPass directives defined from the main server ProxyPassInterpolateEnv On|Off Off svdEEnable Environment Variable interpolation in Reverse Proxy configurations ProxyPassMatch [regex] !|url [key=value [key=value ...]]svdEMaps remote servers into the local server URL-space using regular expressions @@ -907,110 +931,116 @@ Remote Server Auth Remote Server Auth SSLProxyCARevocationPath directory-pathsvEDirectory of PEM-encoded CA CRLs for Remote Server Auth -SSLProxyCheckPeerCN on|off on svEWhether to check the remote server certificates CN field +SSLProxyCheckPeerCN on|off on svEWhether to check the remote server certificate's CN field SSLProxyCheckPeerExpire on|off on svEWhether to check if remote server certificate is expired -SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhECipher Suite available for negotiation in SSL +SSLProxyCheckPeerName on|off on svEConfigure host name checking for remote server certificates + +SSLProxyCipherSuite cipher-spec ALL:!ADH:RC4+RSA:+H +svdhECipher Suite available for negotiation in SSL proxy handshake -SSLProxyEngine on|off off svESSL Proxy Engine Operation Switch -SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate -SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy -SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy -SSLProxyProtocol [+|-]protocol ... all svEConfigure usable SSL protocol flavors for proxy usage -SSLProxyVerify level none svEType of remote server Certificate verification -SSLProxyVerifyDepth number 1 svEMaximum depth of CA Certificates in Remote Server +SSLProxyEngine on|off off svESSL Proxy Engine Operation Switch +SSLProxyMachineCertificateChainFile filenamesEFile of concatenated PEM-encoded CA certificates to be used by the proxy for choosing a certificate +SSLProxyMachineCertificateFile filenamesEFile of concatenated PEM-encoded client certificates and keys to be used by the proxy +SSLProxyMachineCertificatePath directorysEDirectory of PEM-encoded client certificates and keys to be used by the proxy +SSLProxyProtocol [+|-]protocol ... all svEConfigure usable SSL protocol flavors for proxy usage +SSLProxyVerify level none svEType of remote server Certificate verification +SSLProxyVerifyDepth number 1 svEMaximum depth of CA Certificates in Remote Server Certificate verification -SSLRandomSeed context source -[bytes]sEPseudo Random Number Generator (PRNG) seeding +SSLRandomSeed context source +[bytes]sEPseudo Random Number Generator (PRNG) seeding source -SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer -SSLRequire expressiondhEAllow access only when an arbitrarily complex +SSLRenegBufferSize bytes 131072 dhESet the size for the SSL renegotiation buffer +SSLRequire expressiondhEAllow access only when an arbitrarily complex boolean expression is true -SSLRequireSSLdhEDeny access when SSL is not used for the +SSLRequireSSLdhEDeny access when SSL is not used for the HTTP request -SSLSessionCache type none sEType of the global/inter-process SSL Session +SSLSessionCache type none sEType of the global/inter-process SSL Session Cache -SSLSessionCacheTimeout seconds 300 svENumber of seconds before an SSL session expires +SSLSessionCacheTimeout seconds 300 svENumber of seconds before an SSL session expires in the Session Cache -SSLSessionTicketKeyFile file-pathsvEPersistent encryption/decryption key for TLS session tickets -SSLSRPUnknownUserSeed secret-stringsvESRP unknown user seed -SSLSRPVerifierFile file-pathsvEPath to SRP verifier file -SSLStaplingCache typesEConfigures the OCSP stapling cache -SSLStaplingErrorCacheTimeout seconds 600 svENumber of seconds before expiring invalid responses in the OCSP stapling cache -SSLStaplingFakeTryLater on|off on svESynthesize "tryLater" responses for failed OCSP stapling queries -SSLStaplingForceURL urisvEOverride the OCSP responder URI specified in the certificate's AIA extension -SSLStaplingResponderTimeout seconds 10 svETimeout for OCSP stapling queries -SSLStaplingResponseMaxAge seconds -1 svEMaximum allowable age for OCSP stapling responses -SSLStaplingResponseTimeSkew seconds 300 svEMaximum allowable time skew for OCSP stapling response validation -SSLStaplingReturnResponderErrors on|off on svEPass stapling related OCSP errors on to client -SSLStaplingStandardCacheTimeout seconds 3600 svENumber of seconds before expiring responses in the OCSP stapling cache -SSLStrictSNIVHostCheck on|off off svEWhether to allow non-SNI clients to access a name-based virtual +SSLSessionTicketKeyFile file-pathsvEPersistent encryption/decryption key for TLS session tickets +SSLSRPUnknownUserSeed secret-stringsvESRP unknown user seed +SSLSRPVerifierFile file-pathsvEPath to SRP verifier file +SSLStaplingCache typesEConfigures the OCSP stapling cache +SSLStaplingErrorCacheTimeout seconds 600 svENumber of seconds before expiring invalid responses in the OCSP stapling cache +SSLStaplingFakeTryLater on|off on svESynthesize "tryLater" responses for failed OCSP stapling queries +SSLStaplingForceURL urisvEOverride the OCSP responder URI specified in the certificate's AIA extension +SSLStaplingResponderTimeout seconds 10 svETimeout for OCSP stapling queries +SSLStaplingResponseMaxAge seconds -1 svEMaximum allowable age for OCSP stapling responses +SSLStaplingResponseTimeSkew seconds 300 svEMaximum allowable time skew for OCSP stapling response validation +SSLStaplingReturnResponderErrors on|off on svEPass stapling related OCSP errors on to client +SSLStaplingStandardCacheTimeout seconds 3600 svENumber of seconds before expiring responses in the OCSP stapling cache +SSLStrictSNIVHostCheck on|off off svEWhether to allow non-SNI clients to access a name-based virtual host. -SSLUserName varnamesdhEVariable name to determine user name -SSLUseStapling on|off off svEEnable stapling of OCSP responses in the TLS handshake -SSLVerifyClient level none svdhEType of Client Certificate verification -SSLVerifyDepth number 1 svdhEMaximum depth of CA Certificates in Client +SSLUserName varnamesdhEVariable name to determine user name +SSLUseStapling on|off off svEEnable stapling of OCSP responses in the TLS handshake +SSLVerifyClient level none svdhEType of Client Certificate verification +SSLVerifyDepth number 1 svdhEMaximum depth of CA Certificates in Client Certificate verification -StartServers numbersMNumber of child server processes created at startup -StartThreads numbersMNumber of threads created on startup -Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content -Suexec On|OffsBEnable or disable the suEXEC feature -SuexecUserGroup User GroupsvEUser and group for CGI programs to run as -ThreadLimit numbersMSets the upper limit on the configurable number of threads +StartServers numbersMNumber of child server processes created at startup +StartThreads numbersMNumber of threads created on startup +Substitute s/pattern/substitution/[infq]dhEPattern to filter the response content +Suexec On|OffsBEnable or disable the suEXEC feature +SuexecUserGroup User GroupsvEUser and group for CGI programs to run as +ThreadLimit numbersMSets the upper limit on the configurable number of threads per child process -ThreadsPerChild numbersMNumber of threads created by each child process -ThreadStackSize sizesMThe size in bytes of the stack used by threads handling +ThreadsPerChild numbersMNumber of threads created by each child process +ThreadStackSize sizesMThe size in bytes of the stack used by threads handling client connections -TimeOut seconds 60 svCAmount of time the server will wait for +TimeOut seconds 60 svCAmount of time the server will wait for certain events before failing a request -TraceEnable [on|off|extended] on svCDetermines the behavior on TRACE requests -TransferLog file|pipesvBSpecify location of a log file -TypesConfig file-path conf/mime.types sBThe location of the mime.types file -UnDefine parameter-namesCUndefine the existence of a variable +TraceEnable [on|off|extended] on svCDetermines the behavior on TRACE requests +TransferLog file|pipesvBSpecify location of a log file +TypesConfig file-path conf/mime.types sBThe location of the mime.types file +UnDefine parameter-namesCUndefine the existence of a variable +UndefMacro namesvdBUndefine a macro UnsetEnv env-variable [env-variable] ...svdhBRemoves variables from the environment -UseCanonicalName On|Off|DNS Off svdCConfigures how the server determines its own name and +Use name [value1 ... valueN] +svdBUse a macro +UseCanonicalName On|Off|DNS Off svdCConfigures how the server determines its own name and port -UseCanonicalPhysicalPort On|Off Off svdCConfigures how the server determines its own port -User unix-userid #-1 sBThe userid under which the server will answer +UseCanonicalPhysicalPort On|Off Off svdCConfigures how the server determines its own port +User unix-userid #-1 sBThe userid under which the server will answer requests -UserDir directory-filename [directory-filename] ... -svBLocation of the user-specific directories -VHostCGIMode On|Off|Secure On vXDetermines whether the virtualhost can run +UserDir directory-filename [directory-filename] ... +svBLocation of the user-specific directories +VHostCGIMode On|Off|Secure On vXDetermines whether the virtualhost can run subprocesses, and the privileges available to subprocesses. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to subprocesses created +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to subprocesses created by a virtual host. -VHostGroup unix-groupidvXSets the Group ID under which a virtual host runs. -VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to a virtual host. -VHostSecure On|Off On vXDetermines whether the server runs with enhanced security +VHostGroup unix-groupidvXSets the Group ID under which a virtual host runs. +VHostPrivs [+-]?privilege-name [[+-]?privilege-name] ...vXAssign arbitrary privileges to a virtual host. +VHostSecure On|Off On vXDetermines whether the server runs with enhanced security for the virtualhost. -VHostUser unix-useridvXSets the User ID under which a virtual host runs. -VirtualDocumentRoot interpolated-directory|none none svEDynamically configure the location of the document root +VHostUser unix-useridvXSets the User ID under which a virtual host runs. +VirtualDocumentRoot interpolated-directory|none none svEDynamically configure the location of the document root for a given virtual host -VirtualDocumentRootIP interpolated-directory|none none svEDynamically configure the location of the document root +VirtualDocumentRootIP interpolated-directory|none none svEDynamically configure the location of the document root for a given virtual host -<VirtualHost +<VirtualHost addr[:port] [addr[:port]] - ...> ... </VirtualHost>sCContains directives that apply only to a specific + ...> ... </VirtualHost>sCContains directives that apply only to a specific hostname or IP address -VirtualScriptAlias interpolated-directory|none none svEDynamically configure the location of the CGI directory for +VirtualScriptAlias interpolated-directory|none none svEDynamically configure the location of the CGI directory for a given virtual host -VirtualScriptAliasIP interpolated-directory|none none svEDynamically configure the location of the CGI directory for +VirtualScriptAliasIP interpolated-directory|none none svEDynamically configure the location of the CGI directory for a given virtual host -WatchdogInterval number-of-seconds 1 sBWatchdog interval in seconds -XBitHack on|off|full off svdhBParse SSI directives in files with the execute bit +WatchdogInterval number-of-seconds 1 sBWatchdog interval in seconds +XBitHack on|off|full off svdhBParse SSI directives in files with the execute bit set -xml2EncAlias charset alias [alias ...]sBRecognise Aliases for encoding values -xml2EncDefault namesvdhBSets a default encoding to assume when absolutely no information +xml2EncAlias charset alias [alias ...]sBRecognise Aliases for encoding values +xml2EncDefault namesvdhBSets a default encoding to assume when absolutely no information can be automatically detected -xml2StartParse element [element ...]svdhBAdvise the parser to skip leading junk. +xml2StartParse element [element ...]svdhBAdvise the parser to skip leading junk.

    可用语言:  de  |  en  |  es  | + fr  |  ja  |  ko  |  tr  | diff --git a/docs/manual/mod/worker.html.tr.utf8 b/docs/manual/mod/worker.html.tr.utf8 index 2f0677e3..e2bec5a4 100644 --- a/docs/manual/mod/worker.html.tr.utf8 +++ b/docs/manual/mod/worker.html.tr.utf8 @@ -30,7 +30,6 @@  ja  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    @@ -135,14 +134,15 @@ süreçlilik modülü.

    worker modülünün öntanımlı süreç-evre yapılandırması genelde şöyledir:

    -

    - ServerLimit 16
    - StartServers 2
    - MaxRequestWorkers 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 diff --git a/docs/manual/new_features_2_4.html.fr b/docs/manual/new_features_2_4.html.fr index e0d6f529..81644f46 100644 --- a/docs/manual/new_features_2_4.html.fr +++ b/docs/manual/new_features_2_4.html.fr @@ -81,11 +81,11 @@ serveur HTTP Apache <If>, etc... -

    KeepAliveTimeout in milliseconds
    -
    It is now possible to specify KeepAliveTimeout in milliseconds. +
    KeepAliveTimeout en millisecondes
    +
    Il est maintenant possible de spcifier KeepAliveTimeout en millisecondes.
    -
    NameVirtualHost directive
    +
    Directive NameVirtualHost
    Cette directive obsolte n'est plus utile.
    Directives autorises dans les fichiers .htaccess
    diff --git a/docs/manual/new_features_2_4.html.tr.utf8 b/docs/manual/new_features_2_4.html.tr.utf8 index 4a978560..33f321e9 100644 --- a/docs/manual/new_features_2_4.html.tr.utf8 +++ b/docs/manual/new_features_2_4.html.tr.utf8 @@ -25,7 +25,6 @@  fr  |  tr 

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

    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 @@ -44,11 +43,13 @@

    Çalışma anında yüklenebilen MPM'ler
    -
    Çok sayıda MPM artık yüklenebilir modül olarak derlenebilmektedir. +
    Çok sayıda MPM artık yüklenebilir + modül olarak derlenebilmektedir. Kullanılacak MPM'in seçimi çalışma anında yapılabilmektedir.
    Event MPM
    -
    Event MPM artık deneysel değil, ancak tam olarak desteklenmiyor.
    +
    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 @@ -302,10 +303,10 @@

    Programlardaki Gelişmeler

    -
    fcgistarter
    +
    fcgistarter
    Yeni FastCGI artalan sunucusu başlatma aracı
    -
    htcacheclean
    +
    htcacheclean
    Arabellekli URL'ler, istenirse metadata'yı da dahil ederek listelenebilmektedir.
    Bazı URL'ler arabellekten tek tek silinebilmektedir.
    @@ -316,7 +317,7 @@ sınıra ek olarak veya bunun yerine dosya düğümü sayısı ile sınırlanabilmektedir.
    -
    rotatelogs
    +
    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.
    diff --git a/docs/manual/platform/index.html b/docs/manual/platform/index.html index c62e3ad8..530d0387 100644 --- a/docs/manual/platform/index.html +++ b/docs/manual/platform/index.html @@ -4,6 +4,10 @@ URI: index.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 +URI: index.html.fr +Content-Language: fr +Content-type: text/html; charset=ISO-8859-1 + URI: index.html.ko.euc-kr Content-Language: ko Content-type: text/html; charset=EUC-KR diff --git a/docs/manual/platform/index.html.en b/docs/manual/platform/index.html.en index 3fb11496..373de084 100644 --- a/docs/manual/platform/index.html.en +++ b/docs/manual/platform/index.html.en @@ -22,6 +22,7 @@ Apache > HTTP Server > Documentation > Version 2.4

    Platform Specific Notes

    Available Languages:  en  | + fr  |  ko  |  zh-cn 

    @@ -108,6 +109,7 @@

    Available Languages:  en  | + fr  |  ko  |  zh-cn 

    ÷

    @@ -93,6 +94,7 @@

    平台相关说明

    可用语言:  en  | + fr  |  ko  |  zh-cn 

    @@ -87,6 +88,7 @@

    可用语言:  en  | + fr  |  ko  |  zh-cn 

    Using Apache With Novell NetWare

    Available Languages:  en  | + fr  |  ko 

    @@ -660,6 +661,7 @@

    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.
    + + + +
    <-
    +

    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 Foire aux questions 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 sur 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 chacun des threads worker en cours + d'excution lorsqu'il devient inactif, de recharger le fichier de + configuration, et de redmarrer chaque thread worker 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 thread worker 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 thread worker 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 peut 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 ajoute des certificats de confiance + pouvant tre utiliss pour crer des connexions scurises vers + des serveurs mandataires.
    • +
    +
      +
    • NWSSLUpgradeable - + Cette directive active le chiffrement SSL sur 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 renseigner le rpertoire + conf. Copiez le fichier HTTPD-STD.CONF + depuis le rpertoire conf de la distribution et + renommez-le en HTTPD.CONF. ditez 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 le chiffrement + 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 8c78a49c..6aa42122 100644 --- a/docs/manual/platform/netware.html.ko.euc-kr +++ b/docs/manual/platform/netware.html.ko.euc-kr @@ -22,6 +22,7 @@ Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    Novell NetWare ġ ϱ

    ֽ ƴմϴ. @@ -577,6 +578,7 @@
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    + + + +
    <-
    +

    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 abd260e8..03d71c67 100644 --- a/docs/manual/platform/perf-hp.html.ko.euc-kr +++ b/docs/manual/platform/perf-hp.html.ko.euc-kr @@ -22,6 +22,7 @@ Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    HPUX ϱ

    ֽ ƴմϴ. @@ -98,6 +99,7 @@ Subject: HP-UX tuning tips
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    + + + +
    <-
    +

    Compiler Apache pour Microsoft Windows

    +
    +

    Langues Disponibles:  en  | + fr  | + ko 

    +
    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.
    + + +

    Il y a de nombreux points importants connatre avant de + compiler Apache pour Microsoft Windows. Avant de commencer, lisez le + document Utiliser Apache avec Microsoft + Windows.

    + +
    + +
    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 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 devrez alors 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 se 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 compiler mod_ssl ou le projet + abs.exe, qui n'est autre que 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 + fonctionner avec les compilations Windows, corrige le nom de + zdll.lib et s'assure que les fichiers .pdb sont gnrs afin de + 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 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 un problme au niveau de la conversion .vcproj des fichiers + .dsp. devenv.exe interprte mal le drapeau + /D pour les drapeaux RC contenant de longues /D'efines, + si ces dernires contiennent 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 transmettent 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 beaucoup 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'exportez 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.
    +
    +
    +

    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 a9b97550..081a97eb 100644 --- a/docs/manual/platform/win_compiling.html.ko.euc-kr +++ b/docs/manual/platform/win_compiling.html.ko.euc-kr @@ -22,6 +22,7 @@ Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    Microsoft Windows ġ

    ֽ ƴմϴ. @@ -419,6 +420,7 @@ nmake /f Makefile.win installd INSTDIR=dir
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    + + + +
    <-
    +

    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. 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.

    +
    +
    +

    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 d34f513d..12da3f06 100644 --- a/docs/manual/platform/windows.html.ko.euc-kr +++ b/docs/manual/platform/windows.html.ko.euc-kr @@ -22,6 +22,7 @@ Apache > HTTP Server > Documentation > Version 2.4 > Platform Specific Notes

    Microsoft Windows ġ

    ֽ ƴմϴ. @@ -684,6 +685,7 @@
    top

    Comments

    Notice:
    This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.
    - -
    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  | diff --git a/docs/manual/programs/rotatelogs.html.en b/docs/manual/programs/rotatelogs.html.en index f4589316..ddabf146 100644 --- a/docs/manual/programs/rotatelogs.html.en +++ b/docs/manual/programs/rotatelogs.html.en @@ -48,6 +48,7 @@ [ -v ] [ -e ] [ -c ] + [ -n number-of-files ] logfile rotationtime|filesize(B|K|M|G) [ offset ]

    @@ -109,6 +110,11 @@ 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".
    +
    logfile

    The path plus basename of the logfile. If logfile diff --git a/docs/manual/programs/rotatelogs.html.fr b/docs/manual/programs/rotatelogs.html.fr index c736c0c7..9424e754 100644 --- a/docs/manual/programs/rotatelogs.html.fr +++ b/docs/manual/programs/rotatelogs.html.fr @@ -51,6 +51,7 @@ [ -v ] [ -e ] [ -c ] + [ -n nombre-de-fichiers ] fichier-journal heure-de-rotation|taille-fichier(B|K|M|G) [ dcalage ]

    @@ -114,6 +115,10 @@ op
    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".
    +
    fichier-journal

    Le chemin et le nom de base du fichier journal. Si fichier-journal contient des caractres '%', il est considr diff --git a/docs/manual/programs/rotatelogs.html.tr.utf8 b/docs/manual/programs/rotatelogs.html.tr.utf8 index 0883acd7..14cb16be 100644 --- a/docs/manual/programs/rotatelogs.html.tr.utf8 +++ b/docs/manual/programs/rotatelogs.html.tr.utf8 @@ -28,6 +28,7 @@  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 diff --git a/docs/manual/programs/suexec.html.en b/docs/manual/programs/suexec.html.en index 99219d95..53a990e7 100644 --- a/docs/manual/programs/suexec.html.en +++ b/docs/manual/programs/suexec.html.en @@ -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/2.4/suexec.html).

    • Synopsis
    • diff --git a/docs/manual/programs/suexec.html.tr.utf8 b/docs/manual/programs/suexec.html.tr.utf8 index d20b548f..70ca352c 100644 --- a/docs/manual/programs/suexec.html.tr.utf8 +++ b/docs/manual/programs/suexec.html.tr.utf8 @@ -25,6 +25,7 @@  ko  |  tr 

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

    suexec, CGI programlarını çalıştırmadan önce Apache HTTP Sunucusu tarafından kullanıcı değiştirmek için kullanılır. diff --git a/docs/manual/rewrite/access.html.en b/docs/manual/rewrite/access.html.en index a0e3b282..df312e6e 100644 --- a/docs/manual/rewrite/access.html.en +++ b/docs/manual/rewrite/access.html.en @@ -145,7 +145,7 @@ SetEnvIf Referer example\.com localreferer

    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.

    diff --git a/docs/manual/rewrite/avoid.html.en b/docs/manual/rewrite/avoid.html.en index 563f0be7..5d76ed97 100644 --- a/docs/manual/rewrite/avoid.html.en +++ b/docs/manual/rewrite/avoid.html.en @@ -147,7 +147,7 @@ with mod_rewrite, it is seldom the right way. Creating individual 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 diff --git a/docs/manual/rewrite/avoid.html.fr b/docs/manual/rewrite/avoid.html.fr index 9d73cf67..1a6920a8 100644 --- a/docs/manual/rewrite/avoid.html.fr +++ b/docs/manual/rewrite/avoid.html.fr @@ -160,7 +160,7 @@ 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 tiers comme mod_macro pour +

    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 diff --git a/docs/manual/rewrite/flags.html.en b/docs/manual/rewrite/flags.html.en index 5f85bd0c..1153c2ed 100644 --- a/docs/manual/rewrite/flags.html.en +++ b/docs/manual/rewrite/flags.html.en @@ -84,7 +84,7 @@ 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:

    @@ -114,7 +114,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
    @@ -167,11 +167,11 @@ 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
    @@ -183,8 +183,8 @@ RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.com:1440:/]
     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
    @@ -233,7 +233,7 @@ variables work.

    VAL may contain backreferences ($N or -%N) which will be expanded.

    +%N) which are expanded.

    Using the short form

    @@ -377,7 +377,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.

    diff --git a/docs/manual/rewrite/index.html.tr.utf8 b/docs/manual/rewrite/index.html.tr.utf8 index 3bb820a5..c536a7eb 100644 --- a/docs/manual/rewrite/index.html.tr.utf8 +++ b/docs/manual/rewrite/index.html.tr.utf8 @@ -26,7 +26,6 @@  tr  |  zh-cn 

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

    mod_rewrite modülü gelen URL isteklerinde değişiklik yapabilmek için düzenli ifade kurallarına diff --git a/docs/manual/sitemap.html.de b/docs/manual/sitemap.html.de index a53a3c45..bb47e3c2 100644 --- a/docs/manual/sitemap.html.de +++ b/docs/manual/sitemap.html.de @@ -204,6 +204,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
  • @@ -242,6 +243,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
  • @@ -258,6 +260,7 @@ HPUX betreiben
  • Apache-Modul mod_proxy_html
  • Apache-Modul mod_proxy_http
  • Apache-Modul mod_proxy_scgi
  • +
  • Apache-Modul mod_proxy_wstunnel
  • Apache-Modul mod_ratelimit
  • Apache-Modul mod_reflector
  • Apache-Modul mod_remoteip
  • diff --git a/docs/manual/sitemap.html.en b/docs/manual/sitemap.html.en index a1cb6296..a02004ea 100644 --- a/docs/manual/sitemap.html.en +++ b/docs/manual/sitemap.html.en @@ -199,6 +199,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
  • @@ -237,6 +238,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
  • @@ -253,6 +255,7 @@ Server on HPUX
  • Apache Module mod_proxy_html
  • Apache Module mod_proxy_http
  • Apache Module mod_proxy_scgi
  • +
  • Apache Module mod_proxy_wstunnel
  • Apache Module mod_ratelimit
  • Apache Module mod_reflector
  • Apache Module mod_remoteip
  • diff --git a/docs/manual/sitemap.html.es b/docs/manual/sitemap.html.es index 3cdcc408..6ef8c60e 100644 --- a/docs/manual/sitemap.html.es +++ b/docs/manual/sitemap.html.es @@ -195,6 +195,7 @@ usados para describir las directivas de Apache
  • Mdulo Apache mod_buffer
  • Mdulo Apache mod_cache
  • Mdulo Apache mod_cache_disk
  • +
  • Mdulo Apache mod_cache_socache
  • Mdulo Apache mod_cern_meta
  • Mdulo Apache mod_cgi
  • Mdulo Apache mod_cgid
  • @@ -233,6 +234,7 @@ usados para describir las directivas de Apache
  • Mdulo Apache mod_log_forensic
  • Mdulo Apache mod_logio
  • Mdulo Apache mod_lua
  • +
  • Mdulo Apache mod_macro
  • Mdulo Apache mod_mime
  • Mdulo Apache mod_mime_magic
  • Mdulo Apache mod_negotiation
  • @@ -249,6 +251,7 @@ usados para describir las directivas de Apache
  • Mdulo Apache mod_proxy_html
  • Mdulo Apache mod_proxy_http
  • Mdulo Apache mod_proxy_scgi
  • +
  • Mdulo Apache mod_proxy_wstunnel
  • Mdulo Apache mod_ratelimit
  • Mdulo Apache mod_reflector
  • Mdulo Apache mod_remoteip
  • diff --git a/docs/manual/sitemap.html.fr b/docs/manual/sitemap.html.fr index 9c686228..68f0f3a3 100644 --- a/docs/manual/sitemap.html.fr +++ b/docs/manual/sitemap.html.fr @@ -105,7 +105,7 @@ descripteurs de fichiers
    top

    Guide de rcriture d'URLs

    -
    -
    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.

    • Belgeler
    • mod_ssl Modülü
    • diff --git a/docs/manual/style/css/prettify.css b/docs/manual/style/css/prettify.css index 46646cb1..012a8e9f 100644 --- a/docs/manual/style/css/prettify.css +++ b/docs/manual/style/css/prettify.css @@ -32,7 +32,7 @@ } /* Put a border around prettyprinted code snippets. */ -pre.prettyprint { padding: 2px; border: 1px solid #888; tab-size: 4; } +pre.prettyprint { padding: 2px; border: 1px solid #888; tab-size: 4; overflow: auto; overflow-y: hidden; } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ @@ -118,4 +118,4 @@ pre.lang-perl{ .lang-perl .lit { color: #088 } /* a literal */ .lang-perl .str { color: #009606 } /* string content */ .lang-perl .kwd { color: #00C; font-weight: bold } /* a keyword */ -.lang-perl .typ { color: #808 } /* a type name */ \ No newline at end of file +.lang-perl .typ { color: #808 } /* a type name */ diff --git a/docs/manual/style/scripts/prettify.js b/docs/manual/style/scripts/prettify.js index 49d134f6..a27abe4f 100644 --- a/docs/manual/style/scripts/prettify.js +++ b/docs/manual/style/scripts/prettify.js @@ -132,7 +132,7 @@ var prettyPrint; 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 = ["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,,AuthType,AuthUserFile,AuthzDBDLoginToReferer,AuthzDBDQuery,AuthzDBDRedirectQuery,AuthzDBMType,,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,,DirectoryIndex,DirectoryIndexRedirect,,DirectorySlash,DocumentRoot,DTracePrivileges,DumpIOInput,DumpIOOutput,,,EnableExceptionHook,EnableMMAP,EnableSendfile,Error,ErrorDocument,ErrorLog,ErrorLogFormat,Example,ExpiresActive,ExpiresByType,ExpiresDefault,ExtendedStatus,ExtFilterDefine,ExtFilterOptions,FallbackResource,FileETag,,,FilterChain,FilterDeclare,FilterProtocol,FilterProvider,FilterTrace,ForceLanguagePriority,ForceType,ForensicLog,GprofDir,GracefulShutdownTimeout,Group,Header,HeaderName,HeartbeatAddress,HeartbeatListen,HeartbeatMaxServers,HeartbeatStorage,HeartbeatStorage,HostnameLookups,IdentityCheck,IdentityCheckTimeout,,,,,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,,,LimitInternalRecursion,LimitRequestBody,LimitRequestFields,LimitRequestFieldSize,LimitRequestLine,LimitXMLRequestBody,Listen,ListenBackLog,LoadFile,LoadModule,,,LogFormat,LogLevel,LogMessage,LuaCodeCache,LuaHookAccessChecker,LuaHookAuthChecker,LuaAuthzProvider,LuaHookCheckUserID,LuaHookFixups,LuaHookInsertFilter,LuaHookMapToStorage,LuaHookTranslateName,LuaHookTypeChecker,LuaInherit,LuaMapHandler,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,,ProxyAddHeaders,ProxyBadHeader,ProxyBlock,ProxyDomain,ProxyErrorOverride,ProxyExpressDBMFile,ProxyExpressDBMType,ProxyExpressEnable,ProxyFtpDirCharset,ProxyFtpEscapeWildcards,ProxyFtpListOnWildcard,ProxyHTMLBufSize,ProxyHTMLCharsetOut,ProxyHTMLDocType,ProxyHTMLEnable,ProxyHTMLEvents,ProxyHTMLExtended,ProxyHTMLFixups,ProxyHTMLInterp,ProxyHTMLLinks,ProxyHTMLStripComments,ProxyHTMLURLMap,ProxyIOBufferSize,,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,,,,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,,VirtualScriptAlias,VirtualScriptAliasIP,WatchdogInterval,XBitHack,xml2EncAlias,xml2EncDefault,xml2StartParse,RewriteLog,RewriteLogLevel"]; + 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,,AuthType,AuthUserFile,AuthzDBDLoginToReferer,AuthzDBDQuery,AuthzDBDRedirectQuery,AuthzDBMType,,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,,DirectoryIndex,DirectoryIndexRedirect,,DirectorySlash,DocumentRoot,DTracePrivileges,DumpIOInput,DumpIOOutput,,,EnableExceptionHook,EnableMMAP,EnableSendfile,Error,ErrorDocument,ErrorLog,ErrorLogFormat,Example,ExpiresActive,ExpiresByType,ExpiresDefault,ExtendedStatus,ExtFilterDefine,ExtFilterOptions,FallbackResource,FileETag,,,FilterChain,FilterDeclare,FilterProtocol,FilterProvider,FilterTrace,ForceLanguagePriority,ForceType,ForensicLog,GprofDir,GracefulShutdownTimeout,Group,Header,HeaderName,HeartbeatAddress,HeartbeatListen,HeartbeatMaxServers,HeartbeatStorage,HeartbeatStorage,HostnameLookups,IdentityCheck,IdentityCheckTimeout,,,,,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,,,LimitInternalRecursion,LimitRequestBody,LimitRequestFields,LimitRequestFieldSize,LimitRequestLine,LimitXMLRequestBody,Listen,ListenBackLog,LoadFile,LoadModule,,,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,,ProxyAddHeaders,ProxyBadHeader,ProxyBlock,ProxyDomain,ProxyErrorOverride,ProxyExpressDBMFile,ProxyExpressDBMType,ProxyExpressEnable,ProxyFtpDirCharset,ProxyFtpEscapeWildcards,ProxyFtpListOnWildcard,ProxyHTMLBufSize,ProxyHTMLCharsetOut,ProxyHTMLDocType,ProxyHTMLEnable,ProxyHTMLEvents,ProxyHTMLExtended,ProxyHTMLFixups,ProxyHTMLInterp,ProxyHTMLLinks,ProxyHTMLStripComments,ProxyHTMLURLMap,ProxyIOBufferSize,,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,,,,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,,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 + diff --git a/docs/manual/style/version.ent b/docs/manual/style/version.ent index b8b47863..63425133 100644 --- a/docs/manual/style/version.ent +++ b/docs/manual/style/version.ent @@ -19,6 +19,6 @@ - + diff --git a/docs/manual/upgrading.html.en b/docs/manual/upgrading.html.en index a1585fe3..031fc8d7 100644 --- a/docs/manual/upgrading.html.en +++ b/docs/manual/upgrading.html.en @@ -118,6 +118,10 @@ RequireNone, and RequireAll.

      +

      If you use mod_authz_dbm, you must port your + configuration to use Require dbm-group ... in place + of Require group ....

      +

      Access control

      @@ -322,6 +326,13 @@ Allow from example.org has been moved into mod_authn_core. +
    • The RewriteLog and RewriteLogLevel directives have been removed. + This functionality is now provided by configuring the appropriate + level of logging for the mod_rewrite module using + the LogLevel directive. + See also the mod_rewrite logging + section.
    • +
    top
    @@ -346,6 +357,10 @@ Allow from example.org - load module mod_access_compat, or update configuration to 2.4 authorization directives.
  • Ignoring deprecated use of DefaultType in line NN of /path/to/httpd.conf - remove DefaultType and replace with other configuration settings.
  • +
  • Invalid command 'AddOutputFilterByType', perhaps misspelled + or defined by a module not included in the server configuration + - AddOutputFilterByType + has moved from the core to mod_filter, which must be loaded.
  • Errors serving requests:
      diff --git a/docs/manual/upgrading.html.fr b/docs/manual/upgrading.html.fr index aa3b2fc6..ac88b113 100644 --- a/docs/manual/upgrading.html.fr +++ b/docs/manual/upgrading.html.fr @@ -125,6 +125,11 @@ n AuthzUserAuthoritative et AuthzOwnerAuthoritative. Ces directives ont t remplaces par les directives plus explicites RequireAny, RequireNone, et RequireAll.

      +

      Si vous utilisez mod_authz_dbm, vous devez + mettre jour votre configuration en remplaant les directives du + style Require group ... par des directives du style + Require dbm-group ....

      +

      Contrle d'accs

      @@ -341,6 +346,14 @@ Allow from example.org AuthnProviderAlias) est maintenant fournie par mod_authn_core. + +
    • Les directives RewriteLog et RewriteLogLevel ont t + supprimes. Pour utiliser les fonctionnalits qu'elles + fournissaient, il faut maintenant dfinir un niveau de + journalisation adquat pour le module + mod_rewrite via la directive LogLevel. Voir aussi la section journalisation de + mod_rewrite. +
    top
    @@ -371,24 +384,14 @@ Allow from example.org module not included in the server configuration - chargez le module mod_access_compat, ou mettez jour vers la version 2.4 les directives d'autorisation.
  • -
  • mixing * ports and non-* ports with a NameVirtualHost address is not supported, 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 - ces messages ne sont pas nouveaux, mais ils bloquent dsormais le dmarrage en gnrant une erreur
  • - -
  • _default_ is not allowed in NameVirtualHost directive - ceci a toujours t le cas, mais prsent cette erreur bloque le dmarrage du serveur.
  • -
  • Ignoring deprecated use of DefaultType in line NN of /path/to/httpd.conf - supprimez la directive DefaultType et remplacez-la par les directives de configuration appropries.
  • -
  • mixing * ports and non-* ports with a NameVirtualHost - address is not supported, 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 - - ce ne sont pas des nouveaux messages, mais ils empchent - maintenant le serveur de dmarrer
  • -
  • _default_ is not allowed in NameVirtualHost - directive - l'explication est dans le message ; cette - dfinition n'a jamais t valide, mais elle empche maintenant le - serveur de dmarrer.
  • +
  • Invalid command 'AddOutputFilterByType', perhaps misspelled + or defined by a module not included in the server configuration + - la directive AddOutputFilterByType qui tait + jusqu'alors implmente par le module core, l'est maintenant par + le module mod_filter, qui doit donc tre charg.
  • Erreurs de traitement des requtes :
      diff --git a/docs/manual/urlmapping.html.en b/docs/manual/urlmapping.html.en index 4247e6dd..939d1aa4 100644 --- a/docs/manual/urlmapping.html.en +++ b/docs/manual/urlmapping.html.en @@ -46,7 +46,7 @@
  • Açıklama:Çok evreli ve çok süreçli melez bir HTTP sunucusu oluşturan çok süreçlilik modülü.
    Durum:MPM
    +
    top

    DocumentRoot

    @@ -66,6 +66,25 @@ in the file /var/www/html/fish/guppies.html being served to the requesting client.

    +

    If a directory is requested (i.e. a path ending with + /), the file served from that directory is defined by + the DirectoryIndex directive. + For example, if DocumentRoot were set as above, and + you were to set:

    + +

    DirectoryIndex index.html index.php

    + +

    Then a request for http://www.example.com/fish/ will + cause httpd to attempt to serve the file + /var/www/html/fish/index.html. In the event that + that file does not exist, it will next attempt to serve the file + /var/www/html/fish/index.php.

    + +

    If neither of these files existed, the next step is to + attempt to provide a directory index, if + mod_autoindex is loaded and configured to permit + that.

    +

    httpd is also capable of Virtual Hosting, where the server receives requests for more than one host. In this case, a different DocumentRoot can be specified for each @@ -308,8 +327,8 @@ proxying scenarios can be handled.

    mod_dir provides FallbackResource, which can be used to map virtual URIs to a real resource, which then serves them. This is a very - useful replace to mod_rewrite when implementing - a 'front controler'

    + useful replacement for mod_rewrite when implementing + a 'front controller'

    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.html.fr b/docs/manual/urlmapping.html.fr index d079a772..0ee9bc74 100644 --- a/docs/manual/urlmapping.html.fr +++ b/docs/manual/urlmapping.html.fr @@ -27,6 +27,8 @@  ko  |  tr 

    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.

    Ce document explique comment le serveur HTTP Apache utilise l'URL contenue dans une requte pour dterminer le noeud du systme de fichier partir duquel le @@ -48,7 +50,7 @@ URLs

    top

    Racine des documents (DocumentRoot)

    @@ -70,6 +72,27 @@ URLs http://www.example.com/fish/guppies.html retournera le fichier /var/www/html/fish/guppies.html au client.

    +

    Si la requte concerne un rpertoire (autrement dit un chemin se + terminant par un slash /), le nom du fichier qui sera + recherch et servi depuis ce rpertoire est dfini via la directive + DirectoryIndex. Par exemple, + supposons que DocumentRoot ait t dfinie comme + prcdemment, et que vous ayez dfini DirectoryIndex + comme suit :

    + +

    DirectoryIndex index.html index.php

    + +

    Si httpd reoit alors une requte pour + http://www.example.com/fish/, il tentera de servir le + fichier /var/www/html/fish/index.html. Si ce fichier + n'existe pas, il tentera de servir le fichier + /var/www/html/fish/index.php.

    + +

    Si aucun de ces fichiers existe, httpd tentera de gnrer et + d'afficher un index du rpertoire, condition que + mod_autoindex ait t charg et configur pour le + permettre.

    +

    httpd supporte aussi les Htes virtuels, ce qui lui permet de traiter des requtes pour plusieurs htes. Dans ce cas, un DocumentRoot diff --git a/docs/manual/urlmapping.html.tr.utf8 b/docs/manual/urlmapping.html.tr.utf8 index 6471af38..271b16cd 100644 --- a/docs/manual/urlmapping.html.tr.utf8 +++ b/docs/manual/urlmapping.html.tr.utf8 @@ -27,6 +27,7 @@  ko  |  tr 

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

    Bu belgede, bir istekte belirtilen URL’nin sunulacak dosyanın dosya sistemindeki yerini bulmak için Apache HTTP Sunucusu tarafından nasıl diff --git a/docs/manual/vhosts/details.html.tr.utf8 b/docs/manual/vhosts/details.html.tr.utf8 index 0233b0ff..3be45622 100644 --- a/docs/manual/vhosts/details.html.tr.utf8 +++ b/docs/manual/vhosts/details.html.tr.utf8 @@ -26,7 +26,6 @@  ko  |  tr 

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

    Bu belgede, bir istek aldığında Apache’nin hangi sanal konak @@ -97,6 +96,10 @@ desteklemediği durumlarda tüm SSL bağlantıları için bu sankon kullanılır.

    +

    VirtualHost içindeki isimlerin sırası (jokersiz) bir + ServerAlias gibi ele alınır (fakat hiçbir + ServerAlias yönergesi ile geçersiz kılınmaz).

    +

    Her sankon için bazı değerler öntanımlı olarak atanır. Bunların başlıcaları:

    diff --git a/docs/manual/vhosts/examples.html.tr.utf8 b/docs/manual/vhosts/examples.html.tr.utf8 index 17fc1bab..ff4c9101 100644 --- a/docs/manual/vhosts/examples.html.tr.utf8 +++ b/docs/manual/vhosts/examples.html.tr.utf8 @@ -27,7 +27,6 @@  ko  |  tr 

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

    Bu belgede sanal konaklarla ile ilgili olarak @@ -58,7 +57,7 @@

    Bu örnekte, makinenizin tek bir IP adresine sahip olduğunu ve bu - makineye mesela.dom ve faraza.dom şeklinde + makineye example.com ve example.org şeklinde (DNS A kayıtları sayesinde) farklı isimlerle erişilebildiğini varsayalım.

    @@ -74,36 +73,29 @@ gelecek ziyaretçileriniz için DNS kayıtlarınızın olması şarttır.

    -

    Sunucu yapılandırması

    - - # Apache’nin 80. portu dinlediğinden emin olalım
    - Listen 80
    -
    - <VirtualHost *:80>
    - - DocumentRoot /siteler/mesela
    - ServerName mesela.dom
    -
    - # Diğer yönergeler, burada ...
    -
    -
    - </VirtualHost>
    -
    - <VirtualHost *:80>
    - - DocumentRoot /siteler/faraza
    - ServerName faraza.dom
    -
    - # Diğer yönergeler, burada ...
    -
    -
    - </VirtualHost> -

    +
    +# Apache’nin 80. portu dinlediğinden emin olalım
    +Listen 80
    +<VirtualHost *:80>
    +  DocumentRoot /siteler/ecom
    +  ServerName example.com
    +
    +  # Diğer yönergeler, burada ...
    +</VirtualHost>
    +
    +<VirtualHost *:80>
    +  DocumentRoot /siteler/eorg
    +  ServerName example.org
    +
    +  # Diğer yönergeler, burada ...
    +</VirtualHost>
    +    
    +

    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. Yapılandırma - dosyasındaki ServerName mesela.dom yönergeli konak, ilk + dosyasındaki ServerName example.com yönergeli konak, ilk sanal konak olduğundan en yüksek önceliğe sahiptir ve öntanımlı veya baskın site olarak davranır. Yani, hiçbir ServerName yönergesi ile eşleşmeyen bir istek @@ -114,12 +106,14 @@

    IP adresi ve porta dayalı ayrımı umursamıyorsanız, * yerine kendi IP adresinizi yazabilirsiniz.

    -

    - NameVirtualHost 192.168.1.22
    -
    - <VirtualHost 192.168.1.22>
    - # vs. ... -

    +
    +NameVirtualHost 192.168.1.22
    +
    +<VirtualHost 192.168.1.22>
    +  # vs. ...
    +</VirtualHost>
    +      
    +

    Bununla birlikte, IP adresinin önceden kestirilebilir olmadığı sistemlerde, örneğin, hizmet sağlayıcınıza çevirmeli ağ ile bağlanıyor @@ -146,43 +140,37 @@

    Sunucunun iki IP adresi olsun. Birinden "ana sunucu" - (192.168.1.2) diğerinden mesela.dom + (192.168.1.2) diğerinden example.com 192.168.2.2 hizmet versin. Bu arada başka sanal konakları da sunabilelim istiyoruz.

    -

    Sunucu yapılandırması

    - - Listen 80
    -
    - # Bu, 192.168.1.2 adresindeki "ana sunucu" olsun
    - ServerName sunucu.faraza.dom
    - DocumentRoot /siteler/anasunucu
    -
    - <VirtualHost 192.168.2.2>
    - - DocumentRoot /siteler/mesela
    - ServerName mesela.dom
    -
    - # Diğer yönergeler, burada ...
    -
    -
    - </VirtualHost>
    -
    - <VirtualHost 192.168.2.2>
    - - DocumentRoot /siteler/falanca
    - ServerName falanca.dom
    -
    - # Diğer yönergeler, burada ...
    -
    -
    - </VirtualHost> -

    - -

    192.168.2.2 adresinden gelmeyen tüm isteklere ana sunucu - (sunucu.faraza.dom), 192.168.2.2 adresinden +

    +Listen 80
    +
    +# Bu, 192.168.1.2 adresindeki "ana sunucu" olsun
    +ServerName sunucu.example.com
    +DocumentRoot /siteler/anasunucu
    +
    +<VirtualHost 192.168.1.20>
    +    DocumentRoot /siteler/ecom
    +    ServerName example.com
    +
    +    # Diğer yönergeler, burada ...
    +</VirtualHost>
    +
    +<VirtualHost 192.168.1.20>
    +    DocumentRoot /siteler/eorg
    +    ServerName example.org
    +
    +    # Diğer yönergeler, burada ...
    +</VirtualHost>
    +    
    + + +

    192.168.1.20 adresinden gelmeyen tüm isteklere ana sunucu + (sunucu.example.com), 192.168.1.20 adresinden gelen sunucu ismi belirtmeyenler ile Host: başlığı - belirtmeyenlere ise mesela.dom hizmet verecektir.

    + belirtmeyenlere ise example.com hizmet verecektir.

    top
    @@ -191,30 +179,28 @@

    Sunucu makine iki IP adresine sahip olsun. Biri iç ağa (192.168.1.1) diğeri dış ağa (172.20.30.40) - bakıyor olsun. sunucu.mesela.dom ismi dış ağda dış ağa + bakıyor olsun. sunucu.example.com ismi dış ağda dış ağa bakan IP’ye, iç ağda ise iç ağa bakan IP’ye çözümleniyor olsun.

    Bu durumda, sunucu hem iç hem de dış ağdan gelen isteklere aynı içerik, dolayısıyla aynı VirtualHost bölümü ile hizmet verebilir.

    -

    Sunucu yapılandırması

    -
    - <VirtualHost 192.168.1.1 172.20.30.40>
    - - DocumentRoot /siteler/sunucu
    - ServerName sunucu.mesela.dom
    - ServerAlias sunucu
    -
    - </VirtualHost> -

    +
    +<VirtualHost 192.168.1.1 172.20.30.40>
    +    DocumentRoot /siteler/sunucu
    +    ServerName sunucu.example.com
    +    ServerAlias sunucu
    +</VirtualHost>
    +    
    +

    Artık, hem iç hem de dış ağdan gelen isteklere aynı VirtualHost bölümünden hizmet sunulacaktır.

    Bilginize:

    İç ağdan istek yapan biri, tam nitelenmiş konak ismi - sunucu.mesela.dom yerine makine ismini + sunucu.example.com yerine makine ismini (sunucu) kullanabilir (ServerAlias sunucu satırına dikkat).

    @@ -232,66 +218,54 @@ 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.

    -

    Sunucu yapılandırması

    - - Listen 80
    - Listen 8080
    -
    - <VirtualHost 172.20.30.40:80>
    - - ServerName mesela.dom
    - DocumentRoot /siteler/mesela-80
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40:8080>
    - - ServerName mesela.dom
    - DocumentRoot /siteler/mesela-8080
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40:80>
    - - ServerName faraza.dom
    - DocumentRoot /siteler/faraza-80
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40:8080>
    - - ServerName faraza.dom
    - DocumentRoot /siteler/faraza-8080
    -
    - </VirtualHost> -

    +
    +Listen 80
    +Listen 8080
    +
    +<VirtualHost 172.20.30.40:80>
    +    ServerName example.com
    +    DocumentRoot /siteler/ecom-80
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40:8080>
    +    ServerName example.com
    +    DocumentRoot /siteler/ecom-8080
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40:80>
    +    ServerName example.org
    +    DocumentRoot /siteler/eorg-80
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40:8080>
    +    ServerName example.org
    +    DocumentRoot /siteler/eorg-8080
    +</VirtualHost>
    +    
    +
    top

    IP’ye dayalı sanal konaklar

    -

    Sunucu makinenin, biri mesela.dom adından çözümlenen - 172.20.30.40, diğeri faraza.dom adından +

    Sunucu makinenin, biri example.com adından çözümlenen + 172.20.30.40, diğeri example.org adından çözümlenen 172.20.30.50 diye iki IP adresi olsun.

    -

    Sunucu yapılandırması

    - - Listen 80
    -
    - <VirtualHost 172.20.30.40>
    - - DocumentRoot /siteler/mesela
    - ServerName mesela.dom
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.50>
    - - DocumentRoot /siteler/faraza
    - ServerName faraza.dom
    -
    - </VirtualHost> -

    +
    +Listen 80
    +
    +<VirtualHost 172.20.30.40>
    +    DocumentRoot /siteler/ecom
    +    ServerName example.com
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.50>
    +    DocumentRoot /siteler/eorg
    +    ServerName example.org
    +</VirtualHost>
    +    
    +

    <VirtualHost> yönergelerinde belirtilmeyen adreslerle yapılan isteklere (örneğin, localhost) sunucu @@ -301,46 +275,38 @@

    Hem IP’ye hem de porta dayalı sanal konaklar

    -

    Sunucu makinenin, biri mesela.dom adından çözümlenen - 172.20.30.40, diğeri faraza.dom adından +

    Sunucu makinenin, biri example.com adından çözümlenen + 172.20.30.40, diğeri example.org adından çözümlenen 172.20.30.50 diye iki IP adresi olsun ve iki konak da hem 80 hem de 8080 portlarında çalışsınlar istiyoruz.

    -

    Sunucu yapılandırması

    - - Listen 172.20.30.40:80
    - Listen 172.20.30.40:8080
    - Listen 172.20.30.50:80
    - Listen 172.20.30.50:8080
    -
    - <VirtualHost 172.20.30.40:80>
    - - DocumentRoot /siteler/mesela-80
    - ServerName mesela.dom
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40:8080>
    - - DocumentRoot /siteler/mesela-8080
    - ServerName mesela.dom
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.50:80>
    - - DocumentRoot /siteler/faraza-80
    - ServerName faraza.dom
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.50:8080>
    - - DocumentRoot /siteler/faraza-8080
    - ServerName faraza.dom
    -
    - </VirtualHost> -

    +
    +Listen 172.20.30.40:80
    +Listen 172.20.30.40:8080
    +Listen 172.20.30.50:80
    +Listen 172.20.30.50:8080
    +
    +<VirtualHost 172.20.30.40:80>
    +    DocumentRoot /siteler/ecom-80
    +    ServerName example.com
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40:8080>
    +    DocumentRoot /siteler/ecom-8080
    +    ServerName example.com
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.50:80>
    +    DocumentRoot /siteler/eorg-80
    +    ServerName example.org
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.50:8080>
    +    DocumentRoot /siteler/eorg-8080
    +    ServerName example.org
    +</VirtualHost>
    +    
    +
    top
    @@ -351,46 +317,36 @@ bir sanal konakta görünmüyorsa bu sankon kesinlikle IP'ye dayalı bir sanal konaktır.

    -

    Sunucu yapılandırması

    - - Listen 80
    -
    - <VirtualHost 172.20.30.40>
    - - DocumentRoot /siteler/mesela
    - ServerName mesela.dom
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40>
    - - DocumentRoot /siteler/faraza
    - ServerName faraza.dom
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40>
    - - DocumentRoot /siteler/falanca
    - ServerName falanca.dom
    -
    - </VirtualHost>
    -
    - # IP-based
    - <VirtualHost 172.20.30.50>
    - - DocumentRoot /siteler/filanca
    - ServerName filanca.dom
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.60>
    - - DocumentRoot /siteler/fesmekan
    - ServerName fesmekan.dom
    -
    - </VirtualHost> -

    +
    +Listen 80
    +
    +<VirtualHost 172.20.30.40>
    +    DocumentRoot /siteler/ecom
    +    ServerName example.com
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40>
    +    DocumentRoot /siteler/eorg
    +    ServerName example.org
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40>
    +    DocumentRoot /siteler/enet
    +    ServerName example.net
    +</VirtualHost>
    +
    +# IP'ye dayalı
    +<VirtualHost 172.20.30.50>
    +    DocumentRoot /siteler/eedu
    +    ServerName example.edu
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.60>
    +    DocumentRoot /siteler/egov
    +    ServerName example.gov
    +</VirtualHost>
    +    
    +
    top
    @@ -405,16 +361,15 @@ ve konak isminin de aktarılmasını arzuladığımızdan ProxyPreserveHost On yönergesini kullandık.

    -

    - <VirtualHost *:*>
    - - ProxyPreserveHost On
    - ProxyPass / http://192.168.111.2/
    - ProxyPassReverse / http://192.168.111.2/
    - ServerName konak.mesela.dom
    -
    - </VirtualHost> -

    +
    +<VirtualHost *:*>
    +    ProxyPreserveHost On
    +    ProxyPass / http://192.168.111.2/
    +    ProxyPassReverse / http://192.168.111.2/
    +    ServerName konak.example.com
    +</VirtualHost>
    +    
    +
    top
    @@ -426,15 +381,12 @@

    Bir IP adresi ve port belirtilmeyen veya hiçbir sanal konağın hiçbir adresi/portu ile eşleşmeyen istekleri yakalamak istersek...

    -

    Sunucu yapılandırması

    - +

    +<VirtualHost _default_:*>
    +    DocumentRoot /siteler/default
    +</VirtualHost>
    +    
    - <VirtualHost _default_:*>
    - - DocumentRoot /siteler/default
    -
    - </VirtualHost> -

    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.

    @@ -457,23 +409,18 @@

    Önceki yapılandırmaya ek olarak 80. portta ayrı bir _default_ sanal konağı kullanmak istersek...

    -

    Sunucu yapılandırması

    - +

    +<VirtualHost _default_:80>
    +    DocumentRoot /siteler/default80
    +    # ...
    +</VirtualHost>
    +
    +<VirtualHost _default_:*>
    +    DocumentRoot /siteler/default
    +    # ...
    +</VirtualHost>
    +    
    - <VirtualHost _default_:80>
    - - DocumentRoot /siteler/default80
    - # ...
    -
    - </VirtualHost>
    -
    - <VirtualHost _default_:*>
    - - DocumentRoot /siteler/default
    - # ...
    -
    - </VirtualHost> -

    80. porttan hizmet sunan _default_ sanal konağı IP adresi belirtilmeyen tüm istekleri yakalar, bunu yapabilmesi için yapılandırma @@ -487,14 +434,13 @@

    _default_ sanal konağının sadece 80. porttan hizmet sunmasını istersek...

    -

    Sunucu yapılandırması

    - +

    +<VirtualHost _default_:80>
    +    DocumentRoot /siteler/default
    +    ...
    +</VirtualHost>
    +    
    - <VirtualHost _default_:80>
    - DocumentRoot /siteler/default
    - ...
    - </VirtualHost> -

    80. porttan gelen IP adresi belirtilmemiş isteklere _default_ sanal konağı, diğer portlardan gelen adres @@ -510,42 +456,35 @@ sanal konakla yansılamak

    İsme dayalı sanal konak örneklerinin 2. sinde adı - geçen falanca.dom bu örnekte kendi IP adresinden hizmet + geçen example.org 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.

    Çözüm kolay, çünkü yapacağımız sadece VirtualHost - yönergesine yeni IP adresini (192.168.2.2) eklemek + yönergesine yeni IP adresini (192.168.1.2) eklemek olacak.

    -

    Sunucu yapılandırması

    - +

    +Listen 80
    +ServerName example.com
    +DocumentRoot /siteler/ecom
    +
    +<VirtualHost 192.168.1.20 192.168.1.2>
    +    DocumentRoot /siteler/eorg
    +    ServerName example.org
    +    # ...
    +</VirtualHost>
    +
    +<VirtualHost 192.168.1.20>
    +    DocumentRoot /siteler/enet
    +    ServerName example.enet
    +    ServerAlias *.example.enet
    +    # ...
    +</VirtualHost>
    +    
    - Listen 80
    - ServerName mesela.dom
    - DocumentRoot /siteler/mesela
    -
    - <VirtualHost 192.168.1.2>
    -
    - <VirtualHost 192.168.1.2 192.168.2.2>
    - - DocumentRoot /siteler/falanca
    - ServerName falanca.dom
    - # ...
    -
    - </VirtualHost>
    -
    - <VirtualHost 192.168.1.2>
    - - DocumentRoot /siteler/faraza
    - ServerName faraza.dom
    - ServerAlias *.faraza.dom
    - # ...
    -
    - </VirtualHost> -

    Böylece sanal konağa hem yeni (bir IP’ye dayalı sanal konak olarak) hem de eski adresinden (bir isme dayalı sanal konak olarak) @@ -565,41 +504,34 @@ bağlantısı içeren bir bilgilendirme sayfası sunmak üzere yeni bir sanal konak oluşturabiliriz.

    -

    Sunucu yapılandırması

    - +

    +<VirtualHost 172.20.30.40>
    +    # ilk sanal konak
    +    DocumentRoot /siteler/baska
    +    RewriteEngine On
    +    RewriteRule . /siteler/baska/index.html
    +    # ...
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40>
    +DocumentRoot /siteler/baska/bir
    +    ServerName bir.baska.tld
    +    ServerPath /bir/
    +    RewriteEngine On
    +    RewriteRule ^(/bir/.*) /siteler/baska$1
    +    # ...
    +</VirtualHost>
    +
    +<VirtualHost 172.20.30.40>
    +    DocumentRoot /siteler/baska/iki
    +    ServerName iki.baska.tld
    +    ServerPath /iki/
    +    RewriteEngine On
    +    RewriteRule ^(/iki/.*) /siteler/baska$1
    +    # ...
    +</VirtualHost>
    +    
    - <VirtualHost 172.20.30.40>
    - - # ilk sanal konak
    - DocumentRoot /siteler/baska
    - RewriteEngine On
    - RewriteRule . /siteler/baska/index.html
    - # ...
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40>
    - DocumentRoot /siteler/baska/bir
    - - ServerName bir.baska.tld
    - ServerPath /bir/
    - RewriteEngine On
    - RewriteRule ^(/bir/.*) /siteler/baska$1
    - # ...
    -
    - </VirtualHost>
    -
    - <VirtualHost 172.20.30.40>
    - - DocumentRoot /siteler/baska/iki
    - ServerName iki.baska.tld
    - ServerPath /iki/
    - RewriteEngine On
    - RewriteRule ^(/iki/.*) /siteler/baska$1
    - # ...
    -
    - </VirtualHost> -

    ServerPath yönergesinden dolayı http://bir.baska.tld/bir/ şeklinde yapılan isteklere diff --git a/docs/manual/vhosts/fd-limits.html.tr.utf8 b/docs/manual/vhosts/fd-limits.html.tr.utf8 index 83f4ea05..e7f5cbfd 100644 --- a/docs/manual/vhosts/fd-limits.html.tr.utf8 +++ b/docs/manual/vhosts/fd-limits.html.tr.utf8 @@ -27,7 +27,6 @@  ko  |  tr 

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

    Çok büyük sayıda sanal konak kullanıyorsanız ve bunların her biri için @@ -90,10 +89,11 @@ %v biçem değişkeni ile yapılabilir. Günlük girdisi biçem dizgesinin başına bunu ekleyiniz:

    -

    - LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost
    - CustomLog logs/multiple_vhost_log vhost -

    +
    +LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost
    +CustomLog logs/multiple_vhost_log vhost
    +    
    +

    Bu yapılandırma ile her günlük kaydının başında sanal konağın ServerName yönergesine belirtilen diff --git a/docs/manual/vhosts/ip-based.html.tr.utf8 b/docs/manual/vhosts/ip-based.html.tr.utf8 index f8dadcd4..a591cad6 100644 --- a/docs/manual/vhosts/ip-based.html.tr.utf8 +++ b/docs/manual/vhosts/ip-based.html.tr.utf8 @@ -27,7 +27,6 @@  ko  |  tr 

    -
    Bu çeviri güncel olmayabilir. Son değişiklikler için İngilizce sürüm geçerlidir.
    • IP'ye dayalı sanal konak desteği nedir
    • Sistem gereksinimleri
    • @@ -116,9 +115,10 @@ (veya sanal konak) için Listen yönergesi kullanılır. Örnek:

      -

      - Listen 192.0.2.100:80 -

      +
      +Listen 192.0.2.100:80
      +    
      +

      Burada konak ismi yerine IP adresi kullanmanız önerilir (ayrıntılar için DNS ile ilgili konular belgesine @@ -135,27 +135,24 @@ içeren ayrı birer VirtualHost bölümü oluşturulur. Örnek:

      -

      - <VirtualHost 192.168.1.10:80> - - ServerAdmin bilgi@posta.birkobi.dom
      - DocumentRoot /gruplar/birkobi/belgeler
      - ServerName www.birkobi.dom
      - ErrorLog /gruplar/birkobi/günlükler/hatalar.log
      - CustomLog /gruplar/birkobi/günlükler/erisim.log combined -
      - </VirtualHost>
      -
      - <VirtualHost 192.168.1.20:80> - - ServerAdmin bilgi@posta.digerkobi.dom
      - DocumentRoot /gruplar/digerkobi/belgeler
      - ServerName www.digerkobi.dom
      - ErrorLog /gruplar/digerkobi/günlükler/hatalar.log
      - CustomLog /gruplar/digerkobi/günlükler/erisim.log combined -
      - </VirtualHost> -

      +
      +<VirtualHost 192.168.1.10:80>
      +    ServerAdmin bilgi@example.com
      +    DocumentRoot /siteler/belgeler/ecom
      +    ServerName example.com
      +    ErrorLog /siteler/gunlukler/ecom/hatalar.log
      +    CustomLog /siteler/gunlukler/ecom/erisim.log combined
      +</VirtualHost>
      +
      +<VirtualHost 192.168.1.20:80>
      +    ServerAdmin bilgi@example.org
      +    DocumentRoot /siteler/belgeler/eorg
      +    ServerName example.org
      +    ErrorLog /siteler/gunlukler/eorg/hatalar.log
      +    CustomLog /siteler/gunlukler/eorg/erisim.log combined
      +</VirtualHost>
      +    
      +

      <VirtualHost> yönergesinde konak ismi yerine IP adresi kullanmanız önerilir (ayrıntılar için diff --git a/docs/manual/vhosts/mass.html.tr.utf8 b/docs/manual/vhosts/mass.html.tr.utf8 index 36e50606..c1327ebb 100644 --- a/docs/manual/vhosts/mass.html.tr.utf8 +++ b/docs/manual/vhosts/mass.html.tr.utf8 @@ -26,7 +26,6 @@  ko  |  tr 

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

    Bu belgede sanal konakların sonu belirsiz bir şekilde artışı karşısında @@ -54,7 +53,7 @@ <VirtualHost> bölümü içereceği zaman yapılacaklar ile ilgilidir.

    -
    +
     <VirtualHost 111.22.33.44>
         ServerName                 musteri-1.example.com
         DocumentRoot        /siteler/musteri-1/belgeler
    @@ -74,6 +73,7 @@
     </VirtualHost>
     
    +

    İsteğimiz çok sayıda <VirtualHost> bölümünü devingen olarak çalışan tek bir <VirtualHost> bölümüyle değiştirmektir. Bunun elbette bazı getirileri olacaktır:

    @@ -150,20 +150,21 @@ düzenlemesinin mod_vhost_alias kullanarak gerçekleştirilmiş halini içeren httpd.conf bölümü aşağıdadır.

    -

    -# sunucu ismini Host: başlığından elde edelim
    -UseCanonicalName Off
    -
    -# Bu günlükleme biçiminde split-logfile aracı kullanılarak
    -# ilk alana dayalı sanal konak günlükleri 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
    +

    +# 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
    -

    +
    +

    Bu yapılandırmayı IP’ye dayalı sanal konaklar için kullanmak isterseniz UseCanonicalName Off yerine UseCanonicalName @@ -187,18 +188,19 @@ VirtualScriptAlias /siteler/%0/cgi-bin sanal konak için bir tane değil hepsi için bir tane cgi-bin olacaktır.

    -

    - 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/
    -

    +
    +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/
    +    
    +

    mod_vhost_alias belgesinde daha karmaşık VirtualDocumentRoot örnekleri vardır.

    @@ -214,47 +216,40 @@ VirtualScriptAlias /siteler/%0/cgi-bin 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:

    -

    -UseCanonicalName Off
    -
    -LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    -
    -<Directory /siteler/kurumsal>
    - - Options FollowSymLinks
    - AllowOverride All
    -
    -</Directory>
    -
    -<Directory /siteler/bireysel>
    - - Options FollowSymLinks
    - AllowOverride None
    -
    -</Directory>
    -
    -<VirtualHost 111.22.33.44>
    - - ServerName kurumsal.example.com
    -
    - CustomLog logs/access_log.kurumsal vcommon
    -
    - VirtualDocumentRoot /siteler/kurumsal/%0/belgeler
    - VirtualScriptAlias /siteler/kurumsal/%0/cgi-bin
    -
    -</VirtualHost>
    -
    -<VirtualHost 111.22.33.45>
    - - ServerName bireysel.example.com
    -
    - CustomLog logs/access_log.bireysel vcommon
    -
    - VirtualDocumentRoot /siteler/bireysel/%0/belgeler
    - ScriptAlias /cgi-bin/ /siteler/std-cgi/
    -
    +

    +UseCanonicalName Off
    +
    +LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    +
    +<Directory /siteler/kurumsal>
    +    Options FollowSymLinks
    +    AllowOverride All
    +</Directory>
    +
    +<Directory /siteler/bireysel>
    +    Options FollowSymLinks
    +    AllowOverride None
    +</Directory>
    +
    +<VirtualHost 111.22.33.44>
    +    ServerName kurumsal.example.com
    +
    +    CustomLog logs/access_log.kurumsal vcommon
    +
    +    VirtualDocumentRoot /siteler/kurumsal/%0/belgeler
    +    VirtualScriptAlias  /siteler/kurumsal/%0/cgi-bin
     </VirtualHost>
    -

    + +<VirtualHost 111.22.33.45> + ServerName bireysel.example.com + + CustomLog logs/access_log.bireysel vcommon + + VirtualDocumentRoot /siteler/bireysel/%0/belgeler + ScriptAlias /cgi-bin/ /siteler/std-cgi/ +</VirtualHost> + +

    Bilginize

    Eğer ilk <VirtualHost> bölümü bir ServerName yönergesi içermezse ilgili IP @@ -277,18 +272,19 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    adreslerine göre düzenlenebilir. Günlük kayıtları da IP adreslerine göre ayrıştırılacak şekilde ayarlanabilir.

    -

    -# Sunucu ismini IP adresinden ters DNS sorgusu ile elde edelim
    -UseCanonicalName DNS
    -
    -# 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
    -

    +
    +# Sunucu ismini IP adresinden ters DNS sorgusu ile elde edelim
    +UseCanonicalName DNS
    +
    +# 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
    +
    +
    top
    diff --git a/docs/manual/vhosts/name-based.html.en b/docs/manual/vhosts/name-based.html.en index afc8b25b..5bca26c7 100644 --- a/docs/manual/vhosts/name-based.html.en +++ b/docs/manual/vhosts/name-based.html.en @@ -111,6 +111,18 @@ virtual hosts.

    +

    ServerName inheritance

    +

    It is best to always explicitly list a ServerName in every name-based virtual host.

    +

    If a VirtualHost doesn't specify + a ServerName, 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 influenced name-based virtual host resolution, so it is best to always + explicitly list a ServerName in every + name-based virtual host.

    +
    +

    For example, suppose that you are serving the domain www.example.com and you wish to add the virtual host other.example.com, which points at the same IP address. diff --git a/docs/manual/vhosts/name-based.html.fr b/docs/manual/vhosts/name-based.html.fr index d4f33d27..a056f32a 100644 --- a/docs/manual/vhosts/name-based.html.fr +++ b/docs/manual/vhosts/name-based.html.fr @@ -28,6 +28,8 @@  ko  |  tr 

    +
    Cette traduction peut tre prime. Vrifiez la version + anglaise pour les changements rcents.

    Ce document dcrit quand et comment utiliser des serveurs virtuels par nom.

    @@ -135,6 +137,20 @@ virtuel bas spcifiques (et non par dfaut).

    +

    Hrirage du nom de serveur

    +

    Il est toujours prfrable de dfinir une directive ServerName au niveau de chaque serveur + virtuel base de nom. Si un serveur virtuel ne dfinit pas + de directive ServerName, 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 ServerName pour chaque serveur virtuel + base de nom.

    +
    +

    Par exemple, supposez que vous hbergez le domaine www.example.com et que vous souhaitez ajouter le serveur virtuel other.example.com qui pointe sur diff --git a/docs/manual/vhosts/name-based.html.tr.utf8 b/docs/manual/vhosts/name-based.html.tr.utf8 index e6611b6c..5ab2f58e 100644 --- a/docs/manual/vhosts/name-based.html.tr.utf8 +++ b/docs/manual/vhosts/name-based.html.tr.utf8 @@ -126,23 +126,20 @@ Barındırma

  • Çok kullanılan sanal konak ya varsayalım. Bunun için httpd.conf dosyanıza basitçe şu satırları ekleyebilirsiniz:

    -

    - <VirtualHost *:80>
    - - #İlk sanal konak aynı zamanda *:80 için de öntanımlıdır. - ServerName site1.example.com
    - ServerAlias example.com
    - DocumentRoot /siteler/site1
    -
    - </VirtualHost>
    -
    - <VirtualHost *:80>
    - - ServerName site2.example.com
    - DocumentRoot /siteler/site2
    -
    - </VirtualHost>
    -

    +
    +<VirtualHost *:80>
    +    #İlk sanal konak aynı zamanda *:80 için de öntanımlıdır.
    +    ServerName site1.example.com
    +    ServerAlias example.com
    +    DocumentRoot /siteler/site1
    +</VirtualHost>
    +
    +<VirtualHost *:80>
    +    ServerName site2.example.com
    +    DocumentRoot /siteler/site2
    +</VirtualHost>
    +    
    +

    İsterseniz, <VirtualHost> yönergesinde argüman olarak * yerine doğrudan bir IP adresi belirtebilirsiniz. Hatta, daha sonra, isme @@ -157,9 +154,10 @@ Barındırma

  • Ç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:

    -

    - ServerAlias example.com *.example.com -

    +
    +ServerAlias example.com *.example.com
    +    
    +

    Böylece example.com alanındaki tüm konaklar için gelen isteklere www.example.com sanal konağından hizmet sunulmuş @@ -176,6 +174,10 @@ Barındırma

  • Çok kullanılan sanal konak ya kullanımları arasında fark gözetilmeksizin ServerName veya ServerAlias yönergesi eşleşen ilk sanal konak kullanılır.

    +

    VirtualHost içindeki isimlerin sırası (jokersiz) bir + ServerAlias gibi ele alınır (fakat hiçbir + ServerAlias yönergesi ile geçersiz kılınmaz).

    +

    Son olarak, sanal konak yapılandırmanıza, <VirtualHost> 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ı diff --git a/httpd.spec b/httpd.spec index 06768e20..5d552036 100644 --- a/httpd.spec +++ b/httpd.spec @@ -4,7 +4,7 @@ Summary: Apache HTTP Server Name: httpd -Version: 2.4.4 +Version: 2.4.6 Release: 1 URL: http://httpd.apache.org/ Vendor: Apache Software Foundation @@ -13,7 +13,7 @@ License: Apache License, Version 2.0 Group: System Environment/Daemons BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: autoconf, perl, pkgconfig, findutils -BuildRequires: zlib-devel, libselinux-devel +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 @@ -332,6 +332,7 @@ rm -rf $RPM_BUILD_ROOT %{_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 @@ -365,6 +366,7 @@ rm -rf $RPM_BUILD_ROOT %{_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 diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 2efda87e..89c41409 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -400,7 +400,24 @@ * 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.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() */ #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */ @@ -408,7 +425,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20120211 #endif -#define MODULE_MAGIC_NUMBER_MINOR 11 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 23 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/ap_release.h b/include/ap_release.h index f01d3a10..0d54fa6f 100644 --- a/include/ap_release.h +++ b/include/ap_release.h @@ -22,8 +22,6 @@ #ifndef AP_RELEASE_H #define AP_RELEASE_H -#include "apr_general.h" /* stringify */ - #define AP_SERVER_COPYRIGHT \ "Copyright 2013 The Apache Software Foundation." @@ -45,15 +43,25 @@ #define AP_SERVER_MAJORVERSION_NUMBER 2 #define AP_SERVER_MINORVERSION_NUMBER 4 -#define AP_SERVER_PATCHLEVEL_NUMBER 4 +#define AP_SERVER_PATCHLEVEL_NUMBER 6 #define AP_SERVER_DEVBUILD_BOOLEAN 0 -#define AP_SERVER_ADD_STRING "-dev" /* Synchronize the above with docs/manual/style/version.ent */ #if !AP_SERVER_DEVBUILD_BOOLEAN -#undef AP_SERVER_ADD_STRING #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/heartbeat.h b/include/heartbeat.h index 7f9ed385..394aed8c 100644 --- a/include/heartbeat.h +++ b/include/heartbeat.h @@ -47,6 +47,11 @@ 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 diff --git a/include/http_protocol.h b/include/http_protocol.h index cd1942e5..415270b2 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 diff --git a/include/http_request.h b/include/http_request.h index a81e7538..1884fbef 100644 --- a/include/http_request.h +++ b/include/http_request.h @@ -528,6 +528,25 @@ 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 modules to handle/emulate the apr_stat() calls + * needed for directory walk. + * @param r The current request + * @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); diff --git a/include/httpd.h b/include/httpd.h index 70eb06f9..36cd58d5 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -1388,7 +1388,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 @@ -1397,7 +1397,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 @@ -1426,22 +1426,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 **. */ @@ -1509,6 +1509,24 @@ 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); + /** * Retrieve a token, spacing over it and adjusting the pointer to * the first non-white byte afterwards. Note that these tokens @@ -1853,7 +1871,7 @@ AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input, * @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, @@ -2093,12 +2111,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 @@ -2218,6 +2230,18 @@ AP_DECLARE(void) ap_get_loadavg(ap_loadavg_t *ld); */ 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 #ifdef __cplusplus diff --git a/include/util_filter.h b/include/util_filter.h index 5f6f9afa..5a966074 100644 --- a/include/util_filter.h +++ b/include/util_filter.h @@ -332,8 +332,8 @@ AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *filter, 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. @@ -486,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 diff --git a/libhttpd.dsp b/libhttpd.dsp index dc7fa366..1f616be6 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" diff --git a/modules/NWGNUmakefile b/modules/NWGNUmakefile index 0ec061ef..6e8113d4 100644 --- a/modules/NWGNUmakefile +++ b/modules/NWGNUmakefile @@ -13,12 +13,13 @@ 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 -ifeq "$(MAKECMDGOALS)" "clean" WITH_LDAP = 1 -else +ifneq "$(MAKECMDGOALS)" "clean" +ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_" WITH_LDAP = 0 endif endif +endif # If USE_STDSOCKETS is defined we allways build mod_ssl ifdef USE_STDSOCKETS @@ -33,6 +34,7 @@ SUBDIRS = \ aaa \ cache \ cluster \ + core \ dav/main \ dav/fs \ dav/lock \ diff --git a/modules/aaa/mod_access_compat.c b/modules/aaa/mod_access_compat.c index 8d7afca1..46d8da0e 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 */ diff --git a/modules/aaa/mod_auth_basic.c b/modules/aaa/mod_auth_basic.c index cadeb5bd..8c1367b3 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 */ @@ -29,26 +28,53 @@ #include "http_protocol.h" #include "http_request.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; + int fake_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->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 +120,72 @@ 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 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."), {NULL} }; @@ -295,10 +378,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 +448,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_digest.c b/modules/aaa/mod_auth_digest.c index 65183160..987e5b5b 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; @@ -223,6 +223,8 @@ static apr_status_t cleanup_tables(void *not_used) opaque_lock = NULL; } + client_list = NULL; + return APR_SUCCESS; } @@ -240,10 +242,8 @@ 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, APLOGNO(01758) - "error generating secret: %s", - apr_strerror(status, buf, sizeof(buf))); + "error generating secret"); return status; } @@ -451,8 +451,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; @@ -532,15 +531,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; } @@ -551,14 +545,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; } @@ -1056,10 +1043,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)); /* @@ -1075,12 +1060,7 @@ static void gen_nonce_hash(char *hash, const char *timestr, const char *opaque, } apr_sha1_final(sha1, &ctx); - for (idx=0; idx> 4]; - *hash++ = hex[sha1[idx] & 0xF]; - } - - *hash++ = '\0'; + ap_bin2hex(sha1, APR_SHA1_DIGESTSIZE, hash); } @@ -1251,19 +1231,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 */ @@ -1464,9 +1442,8 @@ 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, APLOGNO(01772) @@ -1893,15 +1870,17 @@ 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, APLOGNO(01793) "invalid qop `%s' received: %s", @@ -1983,7 +1962,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; diff --git a/modules/aaa/mod_auth_form.c b/modules/aaa/mod_auth_form.c index 28045b5d..7bba517b 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 */ diff --git a/modules/aaa/mod_authn_file.c b/modules/aaa/mod_authn_file.c index a54a423b..9909e443 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} }; diff --git a/modules/aaa/mod_authnz_ldap.c b/modules/aaa/mod_authnz_ldap.c index d55b57f5..2c25dbc7 100644 --- a/modules/aaa/mod_authnz_ldap.c +++ b/modules/aaa/mod_authnz_ldap.c @@ -1443,7 +1443,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; } @@ -1531,6 +1531,43 @@ static const char *set_bind_pattern(cmd_parms *cmd, void *_cfg, const char *exp, 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; +} + static const command_rec authnz_ldap_cmds[] = { AP_INIT_TAKE12("AuthLDAPURL", mod_auth_ldap_parse_url, NULL, OR_AUTHCFG, @@ -1561,8 +1598,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, diff --git a/modules/aaa/mod_authz_groupfile.c b/modules/aaa/mod_authz_groupfile.c index 15bb60ff..934a7d2f 100644 --- a/modules/aaa/mod_authz_groupfile.c +++ b/modules/aaa/mod_authz_groupfile.c @@ -70,22 +70,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} }; diff --git a/modules/aaa/mod_authz_host.c b/modules/aaa/mod_authz_host.c index 90876761..f4d5c41c 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) diff --git a/modules/arch/netware/mod_netware.c b/modules/arch/netware/mod_netware.c index 1c5950da..b34a5222 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 */ diff --git a/modules/arch/win32/mod_isapi.h b/modules/arch/win32/mod_isapi.h index 9f8bc93e..88f50177 100644 --- a/modules/arch/win32/mod_isapi.h +++ b/modules/arch/win32/mod_isapi.h @@ -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/cache/NWGNUcach_socache b/modules/cache/NWGNUcach_socache new file mode 100644 index 00000000..f7ed0e43 --- /dev/null +++ b/modules/cache/NWGNUcach_socache @@ -0,0 +1,262 @@ +# +# 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 \ + $(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 bc0c58fe..e544df62 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/cache_common.h b/modules/cache/cache_common.h index cedce076..9d56d28b 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_socache_common.h b/modules/cache/cache_socache_common.h new file mode 100644 index 00000000..3ee3d0da --- /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 9021ec1d..af60a39b 100644 --- a/modules/cache/cache_storage.c +++ b/modules/cache/cache_storage.c @@ -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') && !strcasecmp(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') && !strcasecmp(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); - } } /* @@ -209,6 +225,13 @@ int cache_select(cache_request_rec *cache, request_rec *r) 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, APLOGNO(00694) "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, APLOGNO(00695) - "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; @@ -389,14 +426,15 @@ int cache_select(cache_request_rec *cache, request_rec *r) return DECLINED; } -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, 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) { /* @@ -410,7 +448,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 @@ -436,15 +474,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; @@ -463,9 +501,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; @@ -488,11 +526,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)) { @@ -524,26 +562,26 @@ 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 = 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, '/')) { + if ((param = ap_strrchr_c(path, ';')) + && !strncmp(param + 1, *identifier, len) + && (*(param + len + 1) == '=') + && !ap_strchr_c(param + len + 2, '/')) { path = apr_pstrndup(p, path, param - path); continue; } @@ -556,7 +594,7 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p, * querystring and followed by a '=' */ if (!strncmp(querystring, *identifier, len) - && (*(querystring + len) == '=')) { + && (*(querystring + len) == '=')) { param = querystring; } else { @@ -574,18 +612,19 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p, } } 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 { /* @@ -605,12 +644,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); } /* @@ -621,9 +660,118 @@ 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, APLOGNO(00698) - "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) +{ + return cache_canonicalise_key(r, p, r->uri, &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_SUCCESS != apr_uri_parse(r->pool, location, &location_uri) + || APR_SUCCESS + != cache_canonicalise_key(r, r->pool, location, + &location_uri, &location_key) + || 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_SUCCESS + != apr_uri_parse(r->pool, content_location, + &content_location_uri) + || APR_SUCCESS + != cache_canonicalise_key(r, r->pool, content_location, + &content_location_uri, &content_location_key) + || 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 2b67970e..83f2946f 100644 --- a/modules/cache/cache_storage.h +++ b/modules/cache/cache_storage.h @@ -40,6 +40,20 @@ int cache_remove_url(cache_request_rec *cache, request_rec *r); int cache_create_entity(cache_request_rec *cache, request_rec *r, apr_off_t size, apr_bucket_brigade *in); int cache_select(cache_request_rec *cache, request_rec *r); + +/** + * 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. + * @param cache cache_request_rec + * @param r request_rec + */ +int cache_invalidate(cache_request_rec *cache, request_rec *r); + apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p, const char **key); @@ -47,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 1e5098d5..7b7fb45c 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -27,8 +27,6 @@ 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. */ @@ -412,9 +410,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); @@ -429,16 +427,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) { @@ -453,6 +450,32 @@ CACHE_DECLARE(int) ap_cache_check_allowed(cache_request_rec *cache, request_rec } } + 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) { @@ -470,7 +493,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) { @@ -543,12 +565,12 @@ 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; } @@ -858,100 +880,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; @@ -960,6 +893,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; @@ -979,7 +916,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; } @@ -1069,9 +1006,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc, /* ...then try slowest cases */ else if (!strncasecmp(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; @@ -1146,9 +1081,7 @@ int ap_cache_control(request_rec *r, cache_control_t *cc, } else if (!strncasecmp(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; @@ -1179,3 +1112,209 @@ 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 (!strncmp(token, "no-cache", 8) + || !strncasecmp(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 (!strncmp(token, "private", 7) + || !strncasecmp(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 = 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); + + cache_control_remove(r, + cache_table_getm(r->pool, headers_out, "Cache-Control"), + headers_out); + + 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; +} + +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 eec38f3a..3a54fadd 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 ", " /** * 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) @@ -292,6 +302,25 @@ apr_status_t cache_remove_lock(cache_server_conf *conf, cache_provider_list *cache_get_providers(request_rec *r, cache_server_conf *conf, apr_uri_t uri); +/** + * 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); + #ifdef __cplusplus } #endif diff --git a/modules/cache/config.m4 b/modules/cache/config.m4 index 5647e89b..b9799b76 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, , cache) +APACHE_MODULE(cache_socache, shared object caching module, $cache_socache_objs, , most) dnl dnl APACHE_CHECK_DISTCACHE diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 4f2d3e04..06bdf460 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -34,6 +34,7 @@ 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; /* * CACHE handler @@ -75,11 +76,6 @@ static int cache_quick_handler(request_rec *r, int lookup) ap_filter_rec_t *cache_out_handle; cache_server_conf *conf; - /* Delay initialization until we know we are handling a GET */ - if (r->method_number != M_GET) { - return DECLINED; - } - conf = (cache_server_conf *) ap_get_module_config(r->server->module_config, &cache_module); @@ -106,6 +102,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"); @@ -117,6 +116,40 @@ static int cache_quick_handler(request_rec *r, int lookup) return DECLINED; } + /* 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: + { + + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02461) + "PUT/POST/DELETE: Adding CACHE_INVALIDATE filter for %s", + 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); + + return DECLINED; + } + case M_GET: { + break; + } + default : { + + 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. * @@ -176,9 +209,10 @@ static int cache_quick_handler(request_rec *r, int lookup) * is available later during running the filter may be * different due to an internal redirect. */ - cache->remove_url_filter = - ap_add_output_filter_handle(cache_remove_url_filter_handle, - cache, r, r->connection); + cache->remove_url_filter = ap_add_output_filter_handle( + cache_remove_url_filter_handle, cache, r, + r->connection); + } else { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, rv, @@ -347,11 +381,6 @@ static int cache_handler(request_rec *r) ap_filter_rec_t *cache_save_handle; cache_server_conf *conf; - /* Delay initialization until we know we are handling a GET */ - if (r->method_number != M_GET) { - return DECLINED; - } - conf = (cache_server_conf *) ap_get_module_config(r->server->module_config, &cache_module); @@ -375,6 +404,47 @@ static int cache_handler(request_rec *r) /* save away the possible providers */ cache->providers = providers; + /* + * Are we allowed to serve cached info at all? + */ + if (!ap_cache_check_no_store(cache, r)) { + return DECLINED; + } + + /* 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: + { + + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, APR_SUCCESS, r, APLOGNO(02463) + "PUT/POST/DELETE: Adding CACHE_INVALIDATE filter for %s", + 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); + + 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; + } + } + /* * Try to serve this request from the cache. * @@ -455,9 +525,10 @@ static int cache_handler(request_rec *r) * is available later during running the filter may be * different due to an internal redirect. */ - cache->remove_url_filter = - ap_add_output_filter_handle(cache_remove_url_filter_handle, - cache, r, r->connection); + cache->remove_url_filter + = ap_add_output_filter_handle( + cache_remove_url_filter_handle, cache, r, + r->connection); } else { @@ -665,7 +736,7 @@ static int cache_save_store(ap_filter_t *f, apr_bucket_brigade *in, */ 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); @@ -682,6 +753,22 @@ 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 const char *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 apr_pstrcat(pool, "contradiction: 304 Not Modified, but ", key, + " modified", NULL); + } + return NULL; +} + /* * CACHE_SAVE filter * --------------- @@ -715,7 +802,7 @@ static apr_status_t 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; apr_pool_t *p; apr_bucket *e; apr_table_t *headers; @@ -857,12 +944,12 @@ static apr_status_t 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; } @@ -871,8 +958,10 @@ static apr_status_t cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) */ 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"); + 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"); } /* Parse the cache control header */ @@ -1000,78 +1089,117 @@ static apr_status_t 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(00770) + "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; - 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 (((reason = cache_header_cmp(r->pool, left, right, "Allow"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Content-Encoding"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Content-Language"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Content-Length"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Content-Location"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Content-MD5"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Content-Range"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Content-Type"))) + || ((reason = cache_header_cmp(r->pool, left, right, "Expires"))) + || ((reason = cache_header_cmp(r->pool, left, right, "ETag"))) + || ((reason = cache_header_cmp(r->pool, left, right, + "Last-Modified")))) { + /* contradiction: 304 Not Modified, but entity header modified */ } - else { - /* RFC 2616 10.3.5 states that entity headers are not supposed - * to be in the 304 response. Therefore, we need to combine the - * response headers with the cached headers *before* we update - * 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. - */ - r->headers_out = ap_cache_cacheable_headers_out(r); - - /* Merge in our cached headers. However, keep any updated values. */ - cache_accept_headers(cache->handle, r, 1); + } - cache->provider->recall_body(cache->handle, r->pool, bb); + /** + * 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) { + apr_table_unset(r->headers_out, "Allow"); + apr_table_unset(r->headers_out, "Content-Encoding"); + apr_table_unset(r->headers_out, "Content-Language"); + apr_table_unset(r->headers_out, "Content-Length"); + apr_table_unset(r->headers_out, "Content-MD5"); + apr_table_unset(r->headers_out, "Content-Range"); + apr_table_unset(r->headers_out, "Content-Type"); + apr_table_unset(r->headers_out, "Last-Modified"); + } - bkt = apr_bucket_eos_create(bb->bucket_alloc); - APR_BRIGADE_INSERT_TAIL(bb, bkt); - } + /* 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) { - cache->block_response = 1; + ap_log_rerror( + APLOG_MARK, APLOG_INFO, 0, r, APLOGNO() "cache: %s responded with an uncacheable 304, retrying the request. Reason: %s", 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"); + + ap_internal_redirect(r->uri, r); + + return APR_SUCCESS; } if (reason) { @@ -1186,7 +1314,7 @@ static apr_status_t 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); @@ -1303,9 +1431,6 @@ static apr_status_t 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 @@ -1319,7 +1444,9 @@ static apr_status_t cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) r->headers_out = ap_cache_cacheable_headers_out(r); /* 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 @@ -1342,6 +1469,10 @@ static apr_status_t 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. */ @@ -1482,6 +1613,70 @@ static apr_status_t cache_remove_url_filter(ap_filter_t *f, 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 * ------------ @@ -1579,11 +1774,11 @@ static int cache_status(cache_handle_t *h, request_rec *r, x_cache = conf->x_cache; } if (x_cache) { - apr_table_setn(headers, "X-Cache", - apr_psprintf(r->pool, "%s from %s", - status == AP_CACHE_HIT ? "HIT" : status - == AP_CACHE_REVALIDATE ? "REVALIDATE" : "MISS", - r->server->server_hostname)); + apr_table_setn(headers, "X-Cache", apr_psprintf(r->pool, "%s from %s", + status == AP_CACHE_HIT ? "HIT" + : status == AP_CACHE_REVALIDATE ? "REVALIDATE" : status + == AP_CACHE_INVALIDATE ? "INVALIDATE" : "MISS", + r->server->server_hostname)); } if (dconf && dconf->x_cache_detail_set) { @@ -1640,7 +1835,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 = @@ -1773,7 +1969,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 */ @@ -2068,7 +2264,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; @@ -2454,6 +2650,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_disk.c b/modules/cache/mod_cache_disk.c index 8427e8fd..2b50aef9 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 { @@ -385,6 +385,7 @@ static int create_entity(cache_handle_t *h, request_rec *r, const char *key, apr 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); @@ -511,6 +512,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); @@ -841,7 +843,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; } @@ -940,6 +942,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; } @@ -1188,49 +1194,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); 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); - 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, 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); - return rv; - } - 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); - return APR_EGENERAL; } /* have we reached the limit of how much we're prepared to write in one @@ -1256,43 +1264,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) { - 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 (!dobj->disk_info.header_only) { + + 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); + 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 */ @@ -1319,7 +1328,12 @@ 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 */ @@ -1342,7 +1356,17 @@ static apr_status_t commit_entity(cache_handle_t *h, request_rec *r) static apr_status_t invalidate_entity(cache_handle_t *h, request_rec *r) { - return APR_ENOTIMPL; + 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) @@ -1447,6 +1471,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; } @@ -1460,6 +1485,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; } diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c new file mode 100644 index 00000000..913de2ee --- /dev/null +++ b/modules/cache/mod_cache_socache.c @@ -0,0 +1,1501 @@ +/* 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 "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 "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 */ + 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 file_size; /* File size of the cached data file */ + 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++) { + len = strlen(elts[i]); + if (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 + 1); + sobj->buffer_len = dconf->max + 1; + + /* 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, rv, 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) { + if (sobj->body) { + apr_brigade_cleanup(sobj->body); + } + else { + sobj->body = apr_brigade_create(r->pool, + r->connection->bucket_alloc); + } + 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->file_size += length; + if (sobj->file_size >= 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->file_size, sobj->buffer_len - sobj->body_offset); + apr_pool_destroy(sobj->pool); + sobj->pool = NULL; + return APR_EGENERAL; + } + + rv = apr_bucket_copy(e, &e); + if (rv != APR_SUCCESS) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02379) + "Error when copying bucket for URL %s", + h->cache_obj->key); + apr_pool_destroy(sobj->pool); + sobj->pool = NULL; + return rv; + } + APR_BRIGADE_INSERT_TAIL(sobj->body, e); + + /* 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_int64_t cl = apr_atoi64(cl_header); + if ((errno == 0) && (sobj->file_size != cl)) { + 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; + apr_size_t len; + + /* flatten the body into the buffer */ + len = sobj->buffer_len - sobj->body_offset; + rv = apr_brigade_flatten(sobj->body, (char *) sobj->buffer + + sobj->body_offset, &len); + if (APR_SUCCESS != rv) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02382) + "could not flatten brigade, not caching: %s", + sobj->key); + goto fail; + } + if (len >= sobj->buffer_len - sobj->body_offset) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(02383) + "body too big for the cache buffer, not caching: %s", + h->cache_obj->key); + goto 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(02384) + "could not acquire lock, ignoring: %s", obj->key); + apr_pool_destroy(sobj->pool); + sobj->pool = NULL; + return rv; + } + } + rv = conf->provider->socache_provider->store( + conf->provider->socache_instance, r->server, + (unsigned char *) sobj->key, strlen(sobj->key), sobj->expire, + sobj->buffer, (unsigned int) sobj->body_offset + len, 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 DECLINED; + } + } + 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 = apr_pcalloc(p, sizeof(cache_socache_conf)); + cache_socache_conf *base = (cache_socache_conf *) basev; + cache_socache_conf *overrides = (cache_socache_conf *) overridesv; + + 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) { + return "CacheSocacheMaxSize argument must be a integer representing the max size of a cached entry (headers and body), at least 1024"; + } + 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_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! */ + } + 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, 32, 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.dsp b/modules/cache/mod_cache_socache.dsp new file mode 100644 index 00000000..e5d582e2 --- /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" /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" /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_socache_memcache.c b/modules/cache/mod_socache_memcache.c index ccb1bde7..beeeec2c 100644 --- a/modules/cache/mod_socache_memcache.c +++ b/modules/cache/mod_socache_memcache.c @@ -182,19 +182,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; } diff --git a/modules/cluster/mod_heartmonitor.c b/modules/cluster/mod_heartmonitor.c index 527bc38e..8e4231dc 100644 --- a/modules/cluster/mod_heartmonitor.c +++ b/modules/cluster/mod_heartmonitor.c @@ -792,7 +792,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); @@ -816,7 +816,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/core/NWGNUmakefile b/modules/core/NWGNUmakefile new file mode 100644 index 00000000..a4dd8d32 --- /dev/null +++ b/modules/core/NWGNUmakefile @@ -0,0 +1,257 @@ +# +# 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 \ + $(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 = macro + +# +# This is used by the link '-desc ' directive. +# If left blank, NLM_NAME will be used. +# +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 = Echo 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)/macro.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_macro.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 = \ + macro_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 + $(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/core/config.m4 b/modules/core/config.m4 index e2799c91..8bb39a5c 100644 --- a/modules/core/config.m4 +++ b/modules/core/config.m4 @@ -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 00000000..ad730054 --- /dev/null +++ b/modules/core/mod_macro.c @@ -0,0 +1,953 @@ +/* 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. + */ + +/* + $Id: mod_macro.c 1455215 2013-03-11 16:28:43Z jim $ +*/ + +#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 "" +#define USE_MACRO "Use" +#define UNDEF_MACRO "UndefMacro" + +/* + Macros are kept globally... + They are not per-server or per-directory entities. + + I would need a hook BEFORE and AFTER configuration processing + to initialize and close them properly, but no such thing is exported, + although it could be available from within apache. + + I would have such a hook if in server/config.c + The "initializer" does not seem to be called before. + + note: they are in a temp_pool, and there is a lazy initialization. + + 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_NOERRNO | APLOG_WARNING, 0, NULL, + "%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, "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( + "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_NOERRNO | APLOG_WARNING, 0, NULL, + "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_NOERRNO | APLOG_WARNING, 0, NULL, + "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_NOERRNO | APLOG_WARNING, + 0, NULL, + "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_NOERRNO | APLOG_WARNING, 0, NULL, + "%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 occurence 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, 1, sizeof(char *)); + } + + /* for each line of the macro body */ + for (i = 0; i < contents->nelts; i++) { + const char *errmsg; + /* copy the line and subtitute 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_NOERRNO | APLOG_WARNING, 0, NULL, + "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_NOERRNO | APLOG_WARNING, 0, NULL, + "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: 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("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_NOERRNO | APLOG_WARNING, 0, NULL, + "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_NOERRNO | APLOG_WARNING, 0, NULL, + "%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, ¯o->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; +} + +/************************************************************* EXPORT MODULE */ + +/* + macro module commands. + configuration file macro stuff + they are processed immediatly 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} +}; + +/* + 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 */ + NULL /* register hooks */ +}; diff --git a/modules/core/mod_macro.dsp b/modules/core/mod_macro.dsp new file mode 100644 index 00000000..61914cc7 --- /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/test/Makefile b/modules/core/test/Makefile new file mode 100755 index 00000000..8ebb1a9e --- /dev/null +++ b/modules/core/test/Makefile @@ -0,0 +1,69 @@ +# +# $Id: Makefile 1435811 2013-01-20 10:07:44Z fabien $ +# +# 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 00000000..6a436f9c --- /dev/null +++ b/modules/core/test/conf/inc63_1.conf @@ -0,0 +1,5 @@ +# macro for include + + Warning "Foo macro at $where" + +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 00000000..3a0da9ea --- /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 100755 index 00000000..9a3d9abb --- /dev/null +++ b/modules/core/test/conf/test01.conf @@ -0,0 +1,3 @@ +# no macro name + + diff --git a/modules/core/test/conf/test02.conf b/modules/core/test/conf/test02.conf new file mode 100755 index 00000000..1fe4b412 --- /dev/null +++ b/modules/core/test/conf/test02.conf @@ -0,0 +1,3 @@ +# no macro name and spaces + + diff --git a/modules/core/test/conf/test03.conf b/modules/core/test/conf/test03.conf new file mode 100755 index 00000000..fdcf4c8c --- /dev/null +++ b/modules/core/test/conf/test03.conf @@ -0,0 +1,5 @@ +# use undefined macro + + Warning "macro foo" + +Use bla diff --git a/modules/core/test/conf/test04.conf b/modules/core/test/conf/test04.conf new file mode 100755 index 00000000..82287754 --- /dev/null +++ b/modules/core/test/conf/test04.conf @@ -0,0 +1,5 @@ +# wrong args + + Warning "macro foo" + +Use foo hello diff --git a/modules/core/test/conf/test05.conf b/modules/core/test/conf/test05.conf new file mode 100755 index 00000000..2166acae --- /dev/null +++ b/modules/core/test/conf/test05.conf @@ -0,0 +1,5 @@ +# wrong args + + Warning "macro foo $premier" + +Use foo diff --git a/modules/core/test/conf/test06.conf b/modules/core/test/conf/test06.conf new file mode 100755 index 00000000..35e6b684 --- /dev/null +++ b/modules/core/test/conf/test06.conf @@ -0,0 +1,6 @@ +# wrong args + + Warning "macro foo $premier" + +Use foo one two + diff --git a/modules/core/test/conf/test07.conf b/modules/core/test/conf/test07.conf new file mode 100755 index 00000000..06f050e4 --- /dev/null +++ b/modules/core/test/conf/test07.conf @@ -0,0 +1,3 @@ +# missing end macro + +hello diff --git a/modules/core/test/conf/test08.conf b/modules/core/test/conf/test08.conf new file mode 100755 index 00000000..333dbd9b --- /dev/null +++ b/modules/core/test/conf/test08.conf @@ -0,0 +1,3 @@ +# missing begin macro +ServerName hello + diff --git a/modules/core/test/conf/test09.conf b/modules/core/test/conf/test09.conf new file mode 100755 index 00000000..2513b6eb --- /dev/null +++ b/modules/core/test/conf/test09.conf @@ -0,0 +1,6 @@ +# recursion is bad + +Use foo + + +Use foo diff --git a/modules/core/test/conf/test10.conf b/modules/core/test/conf/test10.conf new file mode 100755 index 00000000..157129d0 --- /dev/null +++ b/modules/core/test/conf/test10.conf @@ -0,0 +1,10 @@ +# indirect recursion is bad + +Use bla + + + +Use foo + + +Use foo diff --git a/modules/core/test/conf/test11.conf b/modules/core/test/conf/test11.conf new file mode 100755 index 00000000..f397ec63 --- /dev/null +++ b/modules/core/test/conf/test11.conf @@ -0,0 +1,15 @@ +# inner macros... + + +Warning "macro $arg.in line 1" + + + +# 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 100755 index 00000000..84403c6c --- /dev/null +++ b/modules/core/test/conf/test12.conf @@ -0,0 +1,12 @@ +# multiply defined generates a warning + + Warning "macro foo 1, line 1" + + + + Warning "macro foo 2, line 1" + + +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 100755 index 00000000..244470df --- /dev/null +++ b/modules/core/test/conf/test13.conf @@ -0,0 +1,18 @@ +# case insensitive + + Warning "macro FOO line 1" + + + + Warning "macro bla line 1" + + +use foo + + + Warning "redefined macro foo line 1" + + +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 100755 index 00000000..48d88889 --- /dev/null +++ b/modules/core/test/conf/test14.conf @@ -0,0 +1,23 @@ +# VirtualHost example + + + Listen $port + + DocumentRoot $dir + + Warning "directory $dir" + + # limit access to intranet subdir. + + Warning "directory $dir/intranet" + + + + +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 100755 index 00000000..7990e154 --- /dev/null +++ b/modules/core/test/conf/test15.conf @@ -0,0 +1,9 @@ +# non nested... + + + + +use test + + +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 100755 index 00000000..471f66e6 --- /dev/null +++ b/modules/core/test/conf/test16.conf @@ -0,0 +1,11 @@ +# bad nesting + + + + + + +Use foo + + +stop diff --git a/modules/core/test/conf/test17.conf b/modules/core/test/conf/test17.conf new file mode 100755 index 00000000..f6294bbb --- /dev/null +++ b/modules/core/test/conf/test17.conf @@ -0,0 +1,10 @@ +# bad but good nesting + + + + + + +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 100755 index 00000000..118617de --- /dev/null +++ b/modules/core/test/conf/test18.conf @@ -0,0 +1,10 @@ +# bad but good nesting + + + + + + +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 100755 index 00000000..6568e968 --- /dev/null +++ b/modules/core/test/conf/test19.conf @@ -0,0 +1,26 @@ +# okay till done + + + # something + Warning "macro foo line 2 in $where" + + + + Use foo Directory + + + + Use foo Location + + + + Use foo VirtualHost + + + + + Use foo "VirtualHost & Directory" + + + +Error "done line 26." diff --git a/modules/core/test/conf/test20.conf b/modules/core/test/conf/test20.conf new file mode 100755 index 00000000..ccbae0d3 --- /dev/null +++ b/modules/core/test/conf/test20.conf @@ -0,0 +1,11 @@ +# directory in directory through a macro + + + + Warning "macro foo $dir" + + + + + Use foo /tmp + diff --git a/modules/core/test/conf/test21.conf b/modules/core/test/conf/test21.conf new file mode 100755 index 00000000..7a8c4c9a --- /dev/null +++ b/modules/core/test/conf/test21.conf @@ -0,0 +1,11 @@ +# raise an error + + + + Error "macro foo dir /tmp" + + + + + Use foo + diff --git a/modules/core/test/conf/test22.conf b/modules/core/test/conf/test22.conf new file mode 100755 index 00000000..5a89f83a --- /dev/null +++ b/modules/core/test/conf/test22.conf @@ -0,0 +1,11 @@ +# simple nesting + + + + Warning "macro foo" + + + +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 100755 index 00000000..e21e2ee6 --- /dev/null +++ b/modules/core/test/conf/test23.conf @@ -0,0 +1,15 @@ +# macro defined in a directory + + + + Warning "macro foo in /tmp" + + + +Use foo + + + Use foo + + +Error "done!" diff --git a/modules/core/test/conf/test24.conf b/modules/core/test/conf/test24.conf new file mode 100755 index 00000000..d35070e6 --- /dev/null +++ b/modules/core/test/conf/test24.conf @@ -0,0 +1,23 @@ +# nesting... + + + + Warning "macro bla intra" + + + Warning "macro bla private" + + + +# ok location in config +Use bla + +# ok, location in VH + + Use bla + + + + # fails: Location within an Directory + Use bla + diff --git a/modules/core/test/conf/test25.conf b/modules/core/test/conf/test25.conf new file mode 100755 index 00000000..724cf942 --- /dev/null +++ b/modules/core/test/conf/test25.conf @@ -0,0 +1,27 @@ +# ok till stop. + + + Warning "restricted access policy $ips" + + + + Use RestrictedAccessPolicy 10.0.0.0/8 + + + + Use RestrictedAccessPolicy 10.0.0.0/8 + + + + Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24 10.0.0.0/8" + + + + Use LocalAccessOnly + + + + Use LocalAccessOnly + + +Error "done line 27." diff --git a/modules/core/test/conf/test26.conf b/modules/core/test/conf/test26.conf new file mode 100755 index 00000000..bb4b5ad0 --- /dev/null +++ b/modules/core/test/conf/test26.conf @@ -0,0 +1,19 @@ +# ok till stop. +# test quotes... + + + + Warning "funny directory" + + + Warning "funny location" + + + +Use funny /unexpected/1 /intra + + + Use funny /unexpected/2 /intranet + + +Error "done!" diff --git a/modules/core/test/conf/test27.conf b/modules/core/test/conf/test27.conf new file mode 100755 index 00000000..2f3e83c7 --- /dev/null +++ b/modules/core/test/conf/test27.conf @@ -0,0 +1,22 @@ +# define a macro in a macro. + + + + + Warning "foo.$name $dir" + + + + +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 100755 index 00000000..69c1c9b6 --- /dev/null +++ b/modules/core/test/conf/test28.conf @@ -0,0 +1,13 @@ +# interaction with IfModule + + + + Warning "macro foo" + + + Use foo + + Error "done!" + + +Error "should not get there" diff --git a/modules/core/test/conf/test29.conf b/modules/core/test/conf/test29.conf new file mode 100755 index 00000000..7d1f380f --- /dev/null +++ b/modules/core/test/conf/test29.conf @@ -0,0 +1,10 @@ +# trigger line overflow during expansion + + + Warning aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + + +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 100755 index 00000000..72b2bb2c --- /dev/null +++ b/modules/core/test/conf/test30.conf @@ -0,0 +1,12 @@ +# name conficts: the longest is chosen +# also test a parametric section + + + <$directive $dir> + Warning "section $directive $dir" + + + +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 100755 index 00000000..14964ba3 --- /dev/null +++ b/modules/core/test/conf/test31.conf @@ -0,0 +1,16 @@ +# parameter name conflicts + + + Warning "argument name conflicts" + $d $di $dir $dd + + +Use bla '' '' 8080 Listen + + + Warning "conflicts, but arguments are not used" + + +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 100755 index 00000000..0b116eca --- /dev/null +++ b/modules/core/test/conf/test32.conf @@ -0,0 +1,7 @@ +# error if same argument name. + + +# bad + + + diff --git a/modules/core/test/conf/test33.conf b/modules/core/test/conf/test33.conf new file mode 100755 index 00000000..2a8a6dba --- /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 100755 index 00000000..1f4671f4 --- /dev/null +++ b/modules/core/test/conf/test34.conf @@ -0,0 +1,14 @@ +# macro parameter prefix conflicts in two orders + + + Warning "macro foo conflict one" + + + + Warning "macro bla conflict two" + + +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 100755 index 00000000..37a623ed --- /dev/null +++ b/modules/core/test/conf/test35.conf @@ -0,0 +1,10 @@ +# unused arguments + + + Warning "macro cannot be used just within a comment u1 u2 u3" + # n1 n2 + + +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 100755 index 00000000..a68667e1 --- /dev/null +++ b/modules/core/test/conf/test36.conf @@ -0,0 +1,12 @@ + + Warning "many warnings! $u $u1 $u2" + # $n $n1 $n2 + + +# 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 100755 index 00000000..296dde75 --- /dev/null +++ b/modules/core/test/conf/test37.conf @@ -0,0 +1,7 @@ +# empty argument name + + + Warn "macro stupid" + + +Use stupid hello diff --git a/modules/core/test/conf/test38.conf b/modules/core/test/conf/test38.conf new file mode 100755 index 00000000..184763f0 --- /dev/null +++ b/modules/core/test/conf/test38.conf @@ -0,0 +1,10 @@ +# ifmodule + + +Warning it is really a good idea to have mod_macro.c installed. + + + +Error it seems you do not have mod perl installed. + + diff --git a/modules/core/test/conf/test39.conf b/modules/core/test/conf/test39.conf new file mode 100755 index 00000000..792232f2 --- /dev/null +++ b/modules/core/test/conf/test39.conf @@ -0,0 +1,23 @@ +# okay till stop. + + + + Warning Thanks for using mod_macro! + + + + + + Error Sorry, mod_macro must be installed to run this configuration file. + + + +Use ModMacro + + + Warning "macro foo" + + +Use foo + +Error "done!" diff --git a/modules/core/test/conf/test40.conf b/modules/core/test/conf/test40.conf new file mode 100755 index 00000000..e6b81f7a --- /dev/null +++ b/modules/core/test/conf/test40.conf @@ -0,0 +1,33 @@ +# configuration example with mod_macro +# + + + DocumentRoot /foo/document/root/directory + + + # access control to subdirs... + + Warning "location /$subdir" + + + + # 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 + + + +Error Stop configuration file processing. diff --git a/modules/core/test/conf/test41.conf b/modules/core/test/conf/test41.conf new file mode 100755 index 00000000..c4e6bdbe --- /dev/null +++ b/modules/core/test/conf/test41.conf @@ -0,0 +1,20 @@ +# another configuration example without mod_macro + + + DocumentRoot /foo/document/root/directory + + + Warning "location /A" + + + + Warning "location /B" + + + + Warning "location /C" + + + + +Error Stop configuration file processing. diff --git a/modules/core/test/conf/test42.conf b/modules/core/test/conf/test42.conf new file mode 100755 index 00000000..a1426041 --- /dev/null +++ b/modules/core/test/conf/test42.conf @@ -0,0 +1,13 @@ +# multiple macro uses + + + Warning "macro foo $p" + + +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 100755 index 00000000..264b9167 --- /dev/null +++ b/modules/core/test/conf/test43.conf @@ -0,0 +1,29 @@ +# non necessarily nested. + + + +# hello + + + + + + +Use begindir /unexpected/1 +Use enddir + + +Use begindir /unexpected/2 +Use enddir + +Use begindir /unexpected/3 + + +Use enddir + + +Use begindir /unexpected/4 +Use enddir + + +Error ok! diff --git a/modules/core/test/conf/test44.conf b/modules/core/test/conf/test44.conf new file mode 100755 index 00000000..ef4883eb --- /dev/null +++ b/modules/core/test/conf/test44.conf @@ -0,0 +1,19 @@ +# working recursion... + + +use bla + + + + +use foo + + + + + +# foo gonna call bla, bla wont call foo back... +use foo + + +Error okay. diff --git a/modules/core/test/conf/test45.conf b/modules/core/test/conf/test45.conf new file mode 100755 index 00000000..03949358 --- /dev/null +++ b/modules/core/test/conf/test45.conf @@ -0,0 +1,7 @@ +# strange chars + + +# hello $1 %2 &3 @4 #5 ~6 *7 .8 ,9 !a -b +c =d :e ;f ?g + + +Error "done on line 7." diff --git a/modules/core/test/conf/test46.conf b/modules/core/test/conf/test46.conf new file mode 100755 index 00000000..50520ed7 --- /dev/null +++ b/modules/core/test/conf/test46.conf @@ -0,0 +1,11 @@ +# various working prefixes + + +# hello %j @k + + + +# not used. + + +Error okay. diff --git a/modules/core/test/conf/test47.conf b/modules/core/test/conf/test47.conf new file mode 100755 index 00000000..6e736641 --- /dev/null +++ b/modules/core/test/conf/test47.conf @@ -0,0 +1,15 @@ +# empty macro contents... + + + + +Use foo + + + + + +# some contents... + + +Error okay. diff --git a/modules/core/test/conf/test48.conf b/modules/core/test/conf/test48.conf new file mode 100755 index 00000000..96bf4615 --- /dev/null +++ b/modules/core/test/conf/test48.conf @@ -0,0 +1,23 @@ +# test substitution... + + +Warning %premier + + +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 00000000..7a21c823 --- /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 00000000..33dd359f --- /dev/null +++ b/modules/core/test/conf/test50.conf @@ -0,0 +1,5 @@ +# undef non existing macro + + Warning "foo macro" + +UndefMacro bla diff --git a/modules/core/test/conf/test51.conf b/modules/core/test/conf/test51.conf new file mode 100644 index 00000000..50214fa3 --- /dev/null +++ b/modules/core/test/conf/test51.conf @@ -0,0 +1,9 @@ +# undef existing macro, and try to use it + + Warning "foo macro contents" + +# 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 00000000..bb77c737 --- /dev/null +++ b/modules/core/test/conf/test52.conf @@ -0,0 +1,8 @@ +# undef existing macro, and try to use it + + Warning "foo macro contents line 1" + +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 100755 index 00000000..08e8c988 --- /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 00000000..7dd30aca --- /dev/null +++ b/modules/core/test/conf/test54.conf @@ -0,0 +1,6 @@ +# empty 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 00000000..bd978e98 --- /dev/null +++ b/modules/core/test/conf/test55.conf @@ -0,0 +1,11 @@ +# line numbers... + + Warning "macro foo(:2) line 1 ($where)" + + + Warning "macro bla(:5) line 1 ($where)" + Use foo "bla line 2" + +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 00000000..b7366a28 --- /dev/null +++ b/modules/core/test/conf/test56.conf @@ -0,0 +1,18 @@ +# nesting warnings + + + Warning "Open:2 $dir" + + + Warning "Close:1" + + + +# 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 00000000..7c36868b --- /dev/null +++ b/modules/core/test/conf/test57.conf @@ -0,0 +1,4 @@ +# empty argument name + + Warning "macro foo line 1" + diff --git a/modules/core/test/conf/test58.conf b/modules/core/test/conf/test58.conf new file mode 100644 index 00000000..6c8a2eb7 --- /dev/null +++ b/modules/core/test/conf/test58.conf @@ -0,0 +1,4 @@ +# bad directive closing + diff --git a/modules/core/test/conf/test59.conf b/modules/core/test/conf/test59.conf new file mode 100644 index 00000000..9f43d7d3 --- /dev/null +++ b/modules/core/test/conf/test59.conf @@ -0,0 +1,4 @@ +# empty name + + Warning "empty quoted name macro" + diff --git a/modules/core/test/conf/test60.conf b/modules/core/test/conf/test60.conf new file mode 100644 index 00000000..969a4ebe --- /dev/null +++ b/modules/core/test/conf/test60.conf @@ -0,0 +1,17 @@ +# @ escaping + + Warning "macro Foo arg 1: $one" + Warning "macro Foo arg 2: $two" + + + Warning Macro Bla arg 1: @first + Warning Macro Bla arg 2: @second + Use Foo @first 'second' + Use Foo 'first' @second + Use Foo @first @second + + +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 00000000..cd285978 --- /dev/null +++ b/modules/core/test/conf/test61.conf @@ -0,0 +1,18 @@ +# deep expansion + + Warning "F1:1 x=$x" + + + Warning "F2:1 x=$x" + Use F1 $x + + + Warning "F3:1 x=$x" + Use F2 $x + + + Warning "F4:1 x=$x" + Use F3 $x + +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 00000000..9d611de5 --- /dev/null +++ b/modules/core/test/conf/test62.conf @@ -0,0 +1,25 @@ +# test continuations + + Warning \ + "Line:1-2 start at $start" + Warning \ + "Line:3-4 stop at $stop" + + +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 00000000..7988ae44 --- /dev/null +++ b/modules/core/test/conf/test63.conf @@ -0,0 +1,9 @@ +# include +include ${PWD}/inc63_1.conf +Use Foo "test63.conf:3" + + Warning "Bla at $where" + +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 00000000..6c123281 --- /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 00000000..df9adc32 --- /dev/null +++ b/modules/core/test/conf/test65.conf @@ -0,0 +1,11 @@ +# simple use continuation + + # first macro line is a comment + Warning "Line: $line" + +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 00000000..a14e5878 --- /dev/null +++ b/modules/core/test/conf/test66.conf @@ -0,0 +1,7 @@ +# no double substitution + + Warning "Foo: x=$x y=$y" + +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 00000000..04a5d3d9 --- /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 00000000..2a7b85bd --- /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 00000000..11a08300 --- /dev/null +++ b/modules/core/test/conf/test69.conf @@ -0,0 +1,14 @@ +# warn if ignored non-blank stuff after closing '>' + this stuff is ignored... + Warning "Foo" + this stuff is ignored as well... +Use Foo + + Warning "Bla" + +Use Bla + # comments are fine + Warning "Comments" + # 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 00000000..9ea66657 --- /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: +# exit: 1 diff --git a/modules/core/test/ref/test08.out b/modules/core/test/ref/test08.out new file mode 100644 index 00000000..124c7a09 --- /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: without matching section +# exit: 1 diff --git a/modules/core/test/ref/test09.out b/modules/core/test/ref/test09.out new file mode 100644 index 00000000..9af12255 --- /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 00000000..4d81abcf --- /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 00000000..d18c95eb --- /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 00000000..b1ab2348 --- /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 00000000..13d501e3 --- /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 00000000..16507157 --- /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 00000000..b0b82b7b --- /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 00000000..6e0f9cad --- /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: without matching section +# exit: 1 diff --git a/modules/core/test/ref/test17.out b/modules/core/test/ref/test17.out new file mode 100644 index 00000000..c6ca16d0 --- /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 00000000..c5cee819 --- /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 00000000..411e5694 --- /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 00000000..3ce2b607 --- /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": + 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 00000000..7895917b --- /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: ' 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/dav/fs/dbm.c b/modules/dav/fs/dbm.c index 53a97e91..821168e8 100644 --- a/modules/dav/fs/dbm.c +++ b/modules/dav/fs/dbm.c @@ -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); } @@ -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/main/mod_dav.c b/modules/dav/main/mod_dav.c index b5059175..9135cd96 100644 --- a/modules/dav/main/mod_dav.c +++ b/modules/dav/main/mod_dav.c @@ -611,7 +611,9 @@ static int dav_created(request_rec *r, const char *locn, const char *what, const char *body; if (locn == NULL) { - locn = r->uri; + locn = r->unparsed_uri; + } else { + locn = ap_escape_uri(r->pool, locn); } /* did the target resource already exist? */ @@ -707,6 +709,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, @@ -995,8 +1003,8 @@ static int dav_method_put(request_rec *r) 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); + 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 +1026,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 +1050,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 +1068,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); } @@ -2683,11 +2690,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); @@ -2749,10 +2751,10 @@ static int dav_method_copymove(request_rec *r, int is_move) } /* - * 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 * resource effectively removes it from the parent collection, so we @@ -2761,17 +2763,17 @@ static int dav_method_copymove(request_rec *r, int is_move) * 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, + DAV_VALIDATE_PARENT + | 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); diff --git a/modules/dav/main/mod_dav.h b/modules/dav/main/mod_dav.h index 768638c3..7b91b63c 100644 --- a/modules/dav/main/mod_dav.h +++ b/modules/dav/main/mod_dav.h @@ -169,6 +169,21 @@ 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. +** +** is the error stack that the error will be added to. +** +** is the error stack that will be appended. +*/ +DAV_DECLARE(dav_error*) dav_join_error(dav_error* dest, dav_error* src); + + /* error ID values... */ /* IF: header errors */ diff --git a/modules/dav/main/props.c b/modules/dav/main/props.c index d87dd611..e5eaef16 100644 --- a/modules/dav/main/props.c +++ b/modules/dav/main/props.c @@ -594,13 +594,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 and @@ -619,7 +620,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 +638,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/util.c b/modules/dav/main/util.c index aa085841..ab42af02 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) { @@ -635,9 +659,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; diff --git a/modules/filters/mod_charset_lite.c b/modules/filters/mod_charset_lite.c index 39ab18fc..2d3d1439 100644 --- a/modules/filters/mod_charset_lite.c +++ b/modules/filters/mod_charset_lite.c @@ -474,7 +474,7 @@ 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; + int len; switch(ctx->ees) { case EES_LIMIT: @@ -492,12 +492,14 @@ static void log_xlate_error(ap_filter_t *f, apr_status_t rv) case EES_INCOMPLETE_CHAR: rv = 0; strcpy(msgbuf, APLOGNO(02196) "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; - } + 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: diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 48d37b13..79f6f8d1 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -304,8 +304,9 @@ 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; + unsigned int inflate_init:1; + unsigned int filter_init:1; + unsigned int done:1; } deflate_ctx; /* Number of validation bytes (CRC and length) after the compressed data */ @@ -942,6 +943,13 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, return rv; } + /* zero length body? step aside */ + bkt = APR_BRIGADE_FIRST(ctx->bb); + if (APR_BUCKET_IS_EOS(bkt)) { + ap_remove_input_filter(f); + return ap_get_brigade(f->next, bb, mode, block, readbytes); + } + apr_table_unset(r->headers_in, "Content-Length"); apr_table_unset(r->headers_in, "Content-MD5"); @@ -1002,12 +1010,19 @@ 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, APLOGNO(01390) - "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); + ap_remove_input_filter(f); + break; } if (APR_BUCKET_IS_FLUSH(bkt)) { @@ -1036,6 +1051,13 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, break; } + /* 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); @@ -1073,7 +1095,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, } } if (zRC == Z_STREAM_END) { - apr_bucket *tmp_heap, *eos; + apr_bucket *tmp_heap; ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01393) "Zlib: Inflated %ld to %ld : URL %s", @@ -1120,9 +1142,7 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, inflateEnd(&ctx->stream); - eos = apr_bucket_eos_create(f->c->bucket_alloc); - APR_BRIGADE_INSERT_TAIL(ctx->proc_bb, eos); - break; + ctx->done = 1; } } @@ -1356,7 +1376,8 @@ static apr_status_t inflate_out_filter(ap_filter_t *f, apr_bucket_read(e, &data, &len, APR_BLOCK_READ); /* first bucket contains zlib header */ - if (!ctx->inflate_init++) { + if (!ctx->inflate_init) { + ctx->inflate_init = 1; if (len < 10) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01403) "Insufficient data for inflate"); diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c index 658c121a..bd72526d 100644 --- a/modules/filters/mod_ext_filter.c +++ b/modules/filters/mod_ext_filter.c @@ -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->useragent_ip, err, - apr_strerror(err, errbuf, sizeof(errbuf)), + &err, description); } diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 8b9c4c77..af90db67 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -2411,7 +2411,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); diff --git a/modules/filters/mod_proxy_html.c b/modules/filters/mod_proxy_html.c index 6cbe87a9..3e5170d1 100644 --- a/modules/filters/mod_proxy_html.c +++ b/modules/filters/mod_proxy_html.c @@ -668,7 +668,7 @@ static meta *metafix(request_rec *r, const char *buf) if (p != NULL) { while (*p) { p += 7; - while (*p && apr_isspace(*p)) + while (apr_isspace(*p)) ++p; if (*p != '=') continue; @@ -1142,11 +1142,11 @@ static const char *set_flags(cmd_parms *cmd, void *CFG, const char *arg) { 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; diff --git a/modules/filters/mod_ratelimit.c b/modules/filters/mod_ratelimit.c index 028de361..939ab8e9 100644 --- a/modules/filters/mod_ratelimit.c +++ b/modules/filters/mod_ratelimit.c @@ -74,6 +74,7 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb) if (ctx == NULL) { const char *rl = NULL; + int ratelimit; /* no subrequests. */ if (f->r->main != NULL) { @@ -87,22 +88,21 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb) 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_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->state = RATE_LIMIT; + ctx->speed = ratelimit; + /* 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)); @@ -187,7 +187,7 @@ rate_limit_filter(ap_filter_t *f, apr_bucket_brigade *input_bb) rv = apr_brigade_partition(bb, ctx->chunk_size, &stop_point); if (rv != APR_SUCCESS && rv != APR_INCOMPLETE) { ctx->state = RATE_ERROR; - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r, APLOGNO(01456) + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, f->r, APLOGNO(01456) "rl: partition failed."); break; } diff --git a/modules/filters/regexp.h b/modules/filters/regexp.h index 1e5a6269..6af89120 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 8c32baf6..ddc4bfed 100644 --- a/modules/filters/sed0.c +++ b/modules/filters/sed0.c @@ -275,7 +275,7 @@ comploop: } if(p > &commands->respace[RESIZE-1]) { - command_errf(commands, SEDERR_TMMES); + command_errf(commands, SEDERR_TMMES, commands->linebuf); return -1; } diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 78a774ef..3d36c77b 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -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, "style_sheet != NULL) ? " class=\"indexcollastmod\">" : " align=\"right\">",time_str, NULL); @@ -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); } diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 5a0cb382..7808262f 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -354,16 +354,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 diff --git a/modules/generators/mod_status.c b/modules/generators/mod_status.c index 0237f1d7..fe832b32 100644 --- a/modules/generators/mod_status.c +++ b/modules/generators/mod_status.c @@ -405,6 +405,8 @@ static int status_handler(request_rec *r) ")\n\n", NULL); ap_rvputs(r, "

    Server Version: ", ap_get_server_description(), "
    \n", NULL); + ap_rvputs(r, "
    Server MPM: ", + ap_show_mpm(), "
    \n", NULL); ap_rvputs(r, "
    Server Built: ", ap_get_server_built(), "\n

    \n", NULL); ap_rvputs(r, "
    Current Time: ", @@ -619,7 +621,6 @@ static int status_handler(request_rec *r) } if (ap_extended_status && !short_report) { - apr_table_t *vhosts = apr_table_make(r->pool, 10); if (no_table_report) ap_rputs("

    Server Details

    \n\n", r); else @@ -636,10 +637,6 @@ static int status_handler(request_rec *r) for (i = 0; i < server_limit; ++i) { for (j = 0; j < thread_limit; ++j) { - char *escvhost; - long last_used; - const char *vlast; - ws_record = ap_get_scoreboard_worker_from_indexes(i, j); if (ws_record->access_count == 0 && @@ -659,22 +656,6 @@ static int status_handler(request_rec *r) if (req_time < 0L) req_time = 0L; - escvhost = ap_escape_html(r->pool, ws_record->vhost); - last_used = (long)apr_time_sec(nowtime - ws_record->last_used); - if (escvhost && *escvhost) { - if ((vlast = apr_table_get(vhosts, escvhost)) != NULL) { - long temp = atol(vlast); - if (last_used < temp) { - apr_table_setn(vhosts, apr_pstrdup(r->pool, escvhost), - apr_psprintf(r->pool, "%ld", last_used)); - } - } - else { - apr_table_setn(vhosts, apr_pstrdup(r->pool, escvhost), - apr_psprintf(r->pool, "%ld", last_used)); - } - } - lres = ws_record->access_count; my_lres = ws_record->my_access_count; conn_lres = ws_record->conn_count; @@ -754,7 +735,8 @@ static int status_handler(request_rec *r) ws_record->times.tms_cutime / tick, ws_record->times.tms_cstime / tick, #endif - last_used, + (long)apr_time_sec(nowtime - + ws_record->last_used), (long) req_time); format_byte_out(r, conn_bytes); @@ -770,7 +752,8 @@ static int status_handler(request_rec *r) ap_escape_html(r->pool, ap_escape_logitem(r->pool, ws_record->request)), - escvhost); + ap_escape_html(r->pool, + ws_record->vhost)); } else { /* !no_table_report */ if (ws_record->status == SERVER_DEAD) @@ -839,7 +822,8 @@ static int status_handler(request_rec *r) ws_record->times.tms_cutime + ws_record->times.tms_cstime) / tick, #endif - last_used, + (long)apr_time_sec(nowtime - + ws_record->last_used), (long)req_time); ap_rprintf(r, "%-1.1f%-2.2f%-2.2f\n", @@ -850,7 +834,8 @@ static int status_handler(request_rec *r) "%s\n\n", ap_escape_html(r->pool, ws_record->client), - escvhost, + ap_escape_html(r->pool, + ws_record->vhost), ap_escape_html(r->pool, ap_escape_logitem(r->pool, ws_record->request))); @@ -859,10 +844,6 @@ static int status_handler(request_rec *r) } /* for (i...) */ if (!no_table_report) { - int i; - const apr_array_header_t *arr = apr_table_elts(vhosts); - const apr_table_entry_t *elts = (const apr_table_entry_t *)arr->elts; - ap_rputs("\n \
    \ \n \ @@ -881,13 +862,6 @@ static int status_handler(request_rec *r) \n \ \n \
    ChildMegabytes transferred this child
    SlotTotal megabytes transferred this slot
    \n", r); - ap_rputs("
    \n\n\ -\n", r); - for (i = 0; i < arr->nelts; i++) { - ap_rprintf(r, "\n", - elts[i].key, elts[i].val); - } - ap_rputs("
    VhostSeconds since last used
    %s
    %27s
    \n", r); } } /* if (ap_extended_status && !short_report) */ else { @@ -981,4 +955,3 @@ AP_DECLARE_MODULE(status) = NULL, /* command table */ register_hooks /* register_hooks */ }; - diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index b2c678da..09f19565 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; diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index c4a9f342..24a939a4 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -265,7 +265,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, /* 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. + * edition defines new transfer encodings, is unsupported. */ ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, f->r, APLOGNO(01585) "Unknown Transfer-Encoding: %s", tenc); diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 2f786123..6705e704 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -306,13 +306,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 @@ -329,41 +545,30 @@ 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) { + not_modified = 0; + } + else if (cond >= AP_CONDITION_WEAK) { + 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 @@ -378,27 +583,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; } } @@ -410,22 +605,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; } diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 31c53db6..e1a82041 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -597,6 +597,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(); } diff --git a/modules/loggers/mod_log_forensic.c b/modules/loggers/mod_log_forensic.c index 1be12302..bb808e88 100644 --- a/modules/loggers/mod_log_forensic.c +++ b/modules/loggers/mod_log_forensic.c @@ -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 diff --git a/modules/lua/NWGNUmakefile b/modules/lua/NWGNUmakefile index be418cfe..15e6c91e 100644 --- a/modules/lua/NWGNUmakefile +++ b/modules/lua/NWGNUmakefile @@ -26,10 +26,10 @@ include $(AP_WORK)/build/NWGNUhead.inc XINCDIRS += \ $(APR)/include \ $(APRUTIL)/include \ - $(AP_WORK)/include \ - $(AP_WORK)/modules/database \ - $(AP_WORK)/modules/http \ - $(AP_WORK)/modules/ssl \ + $(SRC)/include \ + $(STDMOD)/database \ + $(STDMOD)/http \ + $(STDMOD)/ssl \ $(NWOS) \ $(LUASRC)/src \ $(EOLIST) @@ -129,7 +129,7 @@ NLM_VERSION = # # If this is specified, it will override the default of 64K # -NLM_STACK_SIZE = 8192 +NLM_STACK_SIZE = 131072 # @@ -181,6 +181,7 @@ 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 \ diff --git a/modules/lua/README b/modules/lua/README index c614b3e2..0be0adeb 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,14 +49,10 @@ ** 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: Lua and ap_expr integration in one or both directions ** TODO: document or remove block sections ** TODO: test per-dir behavior of block sections -** TODO: Catch-up documentation on r: methods -** TODO: 500 errors instead of 404 with AddHandler lua-script ** TODO: Suppress internal details (fs path to scripts, etc) in error responses * License @@ -82,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 2d1ac052..8a7a11bf 100644 --- a/modules/lua/config.m4 +++ b/modules/lua/config.m4 @@ -136,7 +136,7 @@ else fi ]) -lua_objects="lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo lua_vmprep.lo lua_dbd.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() diff --git a/modules/lua/lua_apr.c b/modules/lua/lua_apr.c index c93ea9b1..8a1dcf68 100644 --- a/modules/lua/lua_apr.c +++ b/modules/lua/lua_apr.c @@ -14,32 +14,20 @@ * 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" -/** - * 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) +apr_table_t *ap_lua_check_apr_table(lua_State *L, int index) { apr_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, apr_table_t *t) { lua_boxpointer(L, t); luaL_getmetatable(L, "Apr.Table"); @@ -48,9 +36,9 @@ 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_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); return 0; @@ -58,9 +46,9 @@ static int lua_table_set(lua_State *L) 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); + 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); lua_pushstring(L, val); return 1; } @@ -72,7 +60,7 @@ static const luaL_Reg lua_table_methods[] = { }; -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 +76,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 c66cdde9..8a1428ff 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); +apr_table_t *ap_lua_check_apr_table(lua_State *L, int index); +void ap_lua_push_apr_table(lua_State *L, apr_table_t *t); #endif /* !_LUA_APR_H_ */ diff --git a/modules/lua/lua_config.c b/modules/lua/lua_config.c index 07dd932b..bb082380 100644 --- a/modules/lua/lua_config.c +++ b/modules/lua/lua_config.c @@ -51,7 +51,7 @@ static int apl_toscope(const char *name) 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, @@ -257,7 +257,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 d2689da1..8a778ad8 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 index 350ec247..501156f8 100644 --- a/modules/lua/lua_dbd.c +++ b/modules/lua/lua_dbd.c @@ -16,7 +16,6 @@ */ #include "mod_lua.h" -#include "lua_apr.h" #include "lua_dbd.h" APLOG_USE_MODULE(lua); @@ -377,7 +376,7 @@ int lua_db_prepared_select(lua_State *L) 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 prepped statements made through lua. */ + * 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); @@ -468,7 +467,7 @@ int lua_db_prepared_query(lua_State *L) 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 prepped statements made through lua. */ + * 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); @@ -704,7 +703,7 @@ static lua_db_handle* lua_push_db_handle(lua_State *L, request_rec* r, int type, supported. ============================================================================= */ -AP_LUA_DECLARE(int) lua_db_acquire(lua_State *L) +int lua_db_acquire(lua_State *L) { /*~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ const char *type; diff --git a/modules/lua/lua_dbd.h b/modules/lua/lua_dbd.h index 6f74efd0..566204b1 100644 --- a/modules/lua/lua_dbd.h +++ b/modules/lua/lua_dbd.h @@ -50,7 +50,7 @@ typedef struct { lua_db_handle *db; } lua_db_prepared_statement; -AP_LUA_DECLARE(int) lua_db_acquire(lua_State* L); +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); diff --git a/modules/lua/lua_passwd.c b/modules/lua/lua_passwd.c new file mode 100644 index 00000000..ad865362 --- /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 +#endif + +#include "apr_md5.h" +#include "apr_sha1.h" + +#if APR_HAVE_TIME_H +#include +#endif +#if APR_HAVE_CRYPT_H +#include +#endif +#if APR_HAVE_STDLIB_H +#include +#endif +#if APR_HAVE_STRING_H +#include +#endif +#if APR_HAVE_UNISTD_H +#include +#endif +#if APR_HAVE_IO_H +#include +#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 00000000..797556bf --- /dev/null +++ b/modules/lua/lua_passwd.h @@ -0,0 +1,91 @@ +/* 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; +// const char *passwd; + 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 63b192dc..c2cfb535 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -16,23 +16,38 @@ */ #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 + +extern apr_thread_mutex_t* lua_ivm_mutex; 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); + 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, APLOGNO(01484) "Lua Stack Dump: [%s]", msg); - for (i = 1; i <= top; i++) { int t = lua_type(L, i); switch (t) { @@ -153,6 +168,87 @@ static int req_aprtable2luatable_cb(void *l, const char *key, 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) +{ + 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); +} + + +/* + * ======================================================================================================================= + * 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; + rpos += rsize; + } + } + + return rc; +} + /* r:parseargs() returning a lua table */ static int req_parseargs(lua_State *L) { @@ -165,7 +261,7 @@ static int req_parseargs(lua_State *L) return 2; /* [table, table>] */ } -/* r:parsebody() returning a lua table */ +/* 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; @@ -173,26 +269,127 @@ static int req_parsebody(lua_State *L) int res; apr_size_t size; apr_size_t max_post_size; - char *buffer; + 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] */ - 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); + 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) != OK) { + return 2; + } + len = strlen(multipart); + i = 0; + for + ( + start = strstr((char *) data, multipart); + start != start + size; + start = end + ) { + i++; + if (i == POST_MAX_VARS) break; + end = strstr((char *) (start + 1), multipart); + if (!end) end = start + size; + crlf = strstr((char *) start, "\r\n\r\n"); + if (!crlf) 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(L, key, buffer); + } + } + } + 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, table>] */ } + +/* + * 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) != 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) { @@ -212,10 +409,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) */ @@ -246,6 +445,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) { @@ -256,6 +456,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 */ @@ -372,6 +573,11 @@ 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; @@ -412,7 +618,1095 @@ static int req_ssl_is_https_field(request_rec *r) return ap_lua_ssl_is_https(r->connection); } -/* END dispatch mathods for request_rec fields */ +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); + return apr_psprintf(r->pool, "%s %s %s %s %s %s", (opts&OR_NONE) ? "None" : "", (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 = luaL_optnumber(L, 3, 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(®ex, pattern, flags); + if (rv) { + lua_pushboolean(L, 0); + err = apr_palloc(r->pool, 256); + ap_regerror(rv, ®ex, 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(®ex, 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; + + luaL_checktype(L, 1, LUA_TUSERDATA); + luaL_checktype(L, 2, LUA_TNUMBER); + luaL_checktype(L, 3, LUA_TNUMBER); + i = lua_tointeger(L, 2); + j = lua_tointeger(L, 3); + ws_record = ap_get_scoreboard_worker_from_indexes(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) +{ + 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; +} + +/* + * 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) +{ + 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; +} + +/* + * 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) +{ + 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; +} + +/* + * 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) +{ + 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; + } +} + +/* + * 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) +{ + 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; + } +} + +/* + * lua_ap_loaded_modules; r:loaded_modules() - Returns a list of loaded modules + */ +static int lua_ap_loaded_modules(lua_State *L) +{ + 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; +} + +/* + * 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) +{ + 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; +} + + +/* + * === 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) +{ + 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; +} + + +/** + * 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) +{ + 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; +} + + +/** + * 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) +{ + 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; +} + +/** + * ap_strcmp_match (const char *str, const char *expected) + * Determine if a string matches a patterm 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) +{ + 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; +} + + +/** + * 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) +{ + 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; +} + +/** + * 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) +{ + 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; +} + + + +/** + * 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) +{ + 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; +} + + +/** + * 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) +{ + 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; +} + + +/** + * 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) +{ + 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 int lua_ap_get_server_name_for_url(lua_State *L) +{ + 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; +} + +/* ap_state_query (int query_code) item starts a new field */ +static int lua_ap_state_query(lua_State *L) +{ + + 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; +} + +/* + * lua_ap_usleep; r:usleep(microseconds) + * - Sleep for the specified number of microseconds. + */ +static int lua_ap_usleep(lua_State *L) +{ + 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 methods for request_rec fields */ static int req_dispatch(lua_State *L) { @@ -463,7 +1757,7 @@ static int req_dispatch(lua_State *L) 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:{ @@ -532,6 +1826,67 @@ static int req_debug(lua_State *L) return req_log_at(L, APLOG_DEBUG); } +static int lua_ivm_get(lua_State *L) +{ + const char *key, *raw_key; + 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_thread_mutex_lock(lua_ivm_mutex); + apr_pool_userdata_get((void **)&object, raw_key, r->server->process->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_thread_mutex_unlock(lua_ivm_mutex); + return 1; + } + else { + apr_thread_mutex_unlock(lua_ivm_mutex); + return 0; + } +} + + +static int lua_ivm_set(lua_State *L) +{ + const char *key, *raw_key; + const char *value = NULL; + 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_thread_mutex_lock(lua_ivm_mutex); + apr_pool_userdata_get((void **)&object, raw_key, r->server->process->pool); + if (!object) { + object = apr_pcalloc(r->server->process->pool, sizeof(lua_ivm_object)); + ap_varbuf_init(r->server->process->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, r->server->process->pool); + apr_thread_mutex_unlock(lua_ivm_mutex); + return 0; +} + #define APLUA_REQ_TRACE(lev) static int req_trace##lev(lua_State *L) \ { \ return req_log_at(L, APLOG_TRACE##lev); \ @@ -623,6 +1978,21 @@ 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} @@ -637,7 +2007,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); @@ -752,10 +2122,121 @@ 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)); + lua_pushlightuserdata(L, dispatch); lua_setfield(L, LUA_REGISTRYINDEX, "Apache2.Request.dispatch"); @@ -785,7 +2266,7 @@ 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) { lua_boxpointer(L, c); luaL_getmetatable(L, "Apache2.Connection"); @@ -802,7 +2283,7 @@ AP_LUA_DECLARE(void) ap_lua_push_connection(lua_State *L, conn_rec *c) } -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"); @@ -815,7 +2296,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 ad272dc9..b5ed3e5f 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 @@ -37,5 +38,12 @@ typedef struct int type; } req_fun_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 e821fee3..b0eb01c4 100644 --- a/modules/lua/lua_vmprep.c +++ b/modules/lua/lua_vmprep.c @@ -23,6 +23,27 @@ 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 @@ -99,7 +120,7 @@ static void pstack_dump(lua_State *L, apr_pool_t *r, int level, #define makeintegerfield(L, n) lua_pushinteger(L, n); lua_setfield(L, -2, #n) -AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L) +void ap_lua_load_apache2_lmodule(lua_State *L) { lua_getglobal(L, "package"); lua_getfield(L, -1, "loaded"); @@ -127,7 +148,7 @@ AP_LUA_DECLARE(void) ap_lua_load_apache2_lmodule(lua_State *L) makeintegerfield(L, AUTHZ_NEUTRAL); makeintegerfield(L, AUTHZ_GENERAL_ERROR); makeintegerfield(L, AUTHZ_DENIED_NO_USER); - + /* makeintegerfield(L, HTTP_CONTINUE); makeintegerfield(L, HTTP_SWITCHING_PROTOCOLS); @@ -201,6 +222,16 @@ static apr_status_t cleanup_lua(void *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", @@ -295,8 +326,11 @@ static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifec 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) { @@ -333,33 +367,155 @@ static apr_status_t vm_construct(lua_State **vm, void *params, apr_pool_t *lifec return APR_SUCCESS; } +static ap_lua_vm_spec* copy_vm_spec(apr_pool_t* pool, ap_lua_vm_spec* spec) +{ + 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 server_vm_construct(lua_State **resource, void *params, apr_pool_t *pool) +{ + 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; +} + /** * Function used to create a lua_State instance bound into the web * server in the appropriate scope. */ -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) { lua_State *L = NULL; - - if (apr_pool_userdata_get((void **)&L, spec->file, - lifecycle_pool) == APR_SUCCESS) { - - if(L==NULL) { + 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; + } + } + } +#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) { + 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); + "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(&L, spec, lifecycle_pool)) { + AP_DEBUG_ASSERT(L != NULL); + 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 1d3758ca..e46ac9b8 100644 --- a/modules/lua/lua_vmprep.h +++ b/modules/lua/lua_vmprep.h @@ -29,6 +29,7 @@ #include "apr_file_info.h" #include "apr_time.h" #include "apr_pools.h" +#include "apr_reslist.h" #ifndef VMPREP_H @@ -39,11 +40,18 @@ #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 AP_LUA_CACHE_UNSET 0 +#define AP_LUA_CACHE_NEVER 1 +#define AP_LUA_CACHE_STAT 2 +#define AP_LUA_CACHE_FOREVER 3 + +#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 */ @@ -56,8 +64,10 @@ typedef struct /* name of base file to load in the vm */ const char *file; - /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_THREAD */ + /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_THREAD | APL_SCOPE_SERVER */ int scope; + unsigned int vm_min; + unsigned int vm_max; ap_lua_state_open_callback cb; void* cb_arg; @@ -71,6 +81,8 @@ typedef struct */ const char *bytecode; apr_size_t bytecode_len; + + int codecache; } ap_lua_vm_spec; typedef struct @@ -81,18 +93,32 @@ typedef struct ap_regex_t *uri_pattern; const char *bytecode; apr_size_t bytecode_len; + int codecache; } ap_lua_mapped_handler_spec; -/* remove and make static once out of mod_wombat.c */ -AP_LUA_DECLARE(void) ap_lua_openlibs(lua_State *L); +typedef struct +{ + 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; -/* 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); +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) @@ -106,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 b5b626d1..7c35011e 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "lua_apr.h" #include "lua_config.h" @@ -55,6 +56,15 @@ typedef struct { 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_thread_mutex_t* lua_ivm_mutex = NULL; /** * error reporting if lua has an error. @@ -65,7 +75,6 @@ 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("Error!\n", r); ap_rputs("

    ", r); lua_response = lua_tostring(L, -1); @@ -103,9 +112,31 @@ static const char *scope_to_string(unsigned int scope) #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); + } + } } } @@ -130,7 +161,10 @@ static ap_lua_vm_spec *create_vm_spec(apr_pool_t **lifecycle_pool, 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, @@ -160,6 +194,9 @@ static ap_lua_vm_spec *create_vm_spec(apr_pool_t **lifecycle_pool, 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); @@ -169,15 +206,58 @@ static ap_lua_vm_spec *create_vm_spec(apr_pool_t **lifecycle_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) { + 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); @@ -190,11 +270,12 @@ static int lua_handler(request_rec *r) 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); + 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_TRACE3, 0, r, APLOGNO(01474) "got a vm!"); @@ -204,17 +285,309 @@ static int lua_handler(request_rec *r) "lua: Unable to find function %s in %s", "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 ------------------- */ + + +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; + 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); + + ctx = apr_pcalloc(r->pool, sizeof(lua_filter_ctx)); + ctx->broken = 0; + *c = ctx; + /* Find the filter that was called */ + 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); + } + + 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 function %s in %s", + hook_spec->function_name, + hook_spec->file_name); + ap_lua_release_state(L, spec, r); + return APR_EGENERAL; + } + + 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); + } + 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) { + return OK; + } + else { + ap_lua_release_state(L, spec, r); + return APR_ENOENT; + } + } + } + return APR_ENOENT; +} + +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); + } + f->ctx = ctx; + ctx->tmpBucket = apr_brigade_create(r->pool, c->bucket_alloc); + } + 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); + 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); + 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); + 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 --------------- */ @@ -249,7 +622,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap hook_spec->function_name, "request hook"); - L = ap_lua_get_lua_state(pool, spec); + L = ap_lua_get_lua_state(pool, spec, r); if (!L) { ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(01477) @@ -265,6 +638,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap "lua: Unable to find function %s in %s", hook_spec->function_name, hook_spec->file_name); + ap_lua_release_state(L, spec, r); return HTTP_INTERNAL_SERVER_ERROR; } @@ -281,12 +655,109 @@ 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); } + if (rc != DECLINED) { + ap_lua_release_state(L, spec, r); + return rc; + } + ap_lua_release_state(L, spec, r); + } + } + 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 %s %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 function %s in %s", + function_name, + filename); + 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); + } + 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; } @@ -564,7 +1035,55 @@ static const char *register_named_file_function_hook(const char *name, *(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(filter, lua_output_filter_handle, NULL, AP_FTYPE_RESOURCE); + } + else { + spec->direction = AP_LUA_FILTER_INPUT; + ap_register_input_filter(filter, lua_input_filter_handle, NULL, AP_FTYPE_RESOURCE); + } + return NULL; +} 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); @@ -827,6 +1346,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) { @@ -910,6 +1465,29 @@ static const char *register_lua_inherit(cmd_parms *cmd, } return NULL; } +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, @@ -936,12 +1514,33 @@ static const char *register_lua_scope(cmd_parms *cmd, #endif cfg->vm_scope = AP_LUA_SCOPE_THREAD; } + else if (strcmp("server", scope) == 0) { + 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', 'server'" + "values are: 'once', 'request', 'conn'" #if APR_HAS_THREADS - ", 'thread'" + ", 'thread', 'server'" #endif ,scope); } @@ -961,7 +1560,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); @@ -969,7 +1570,7 @@ AP_LUA_DECLARE(const char *) ap_lua_ssl_val(apr_pool_t *p, server_rec *s, conn_r return NULL; } -AP_LUA_DECLARE(int) ap_lua_ssl_is_https(conn_rec *c) +int ap_lua_ssl_is_https(conn_rec *c) { return lua_ssl_is_https ? lua_ssl_is_https(c) : 0; } @@ -1018,7 +1619,7 @@ static authz_status lua_authz_check(request_rec *r, const char *require_line, 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); + 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); @@ -1029,6 +1630,7 @@ static authz_status lua_authz_check(request_rec *r, const char *require_line, ap_log_rerror(APLOG_MARK, APLOG_CRIT, 0, r, APLOGNO(02319) "Unable to find function %s in %s", 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); @@ -1037,6 +1639,7 @@ static authz_status lua_authz_check(request_rec *r, const char *require_line, if (!lua_checkstack(L, prov_spec->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_spec->args->nelts; i++) { @@ -1049,14 +1652,17 @@ static authz_status lua_authz_check(request_rec *r, const char *require_line, 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: @@ -1184,6 +1790,10 @@ command_rec lua_commands[] = { 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"), @@ -1193,6 +1803,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} }; @@ -1204,10 +1820,15 @@ 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->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 = AP_LUA_SCOPE_UNSET; + cfg->codecache = AP_LUA_CACHE_UNSET; + cfg->vm_min = 0; + cfg->vm_max = 0; return cfg; } @@ -1269,24 +1890,31 @@ static void *merge_dir_config(apr_pool_t *p, void *basev, void *overridesv) 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->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; } @@ -1346,9 +1974,15 @@ static void lua_register_hooks(apr_pool_t *p) 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); +#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); + + /* ivm mutex */ + apr_thread_mutex_create(&lua_ivm_mutex, APR_THREAD_MUTEX_DEFAULT, p); } AP_DECLARE_MODULE(lua) = { diff --git a/modules/lua/mod_lua.dsp b/modules/lua/mod_lua.dsp index 71d33b8b..770c13a1 100644 --- a/modules/lua/mod_lua.dsp +++ b/modules/lua/mod_lua.dsp @@ -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 diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h index 52ff96ad..7fd11533 100644 --- a/modules/lua/mod_lua.h +++ b/modules/lua/mod_lua.h @@ -39,6 +39,7 @@ #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 @@ -50,6 +51,7 @@ #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 @@ -81,7 +83,7 @@ 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_PARENT_LAST = 2 } ap_lua_inherit_t; /** @@ -101,9 +103,10 @@ 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; @@ -111,6 +114,8 @@ typedef struct * AP_LUA_SCOPE_ONCE | AP_LUA_SCOPE_REQUEST | AP_LUA_SCOPE_CONN | AP_LUA_SCOPE_SERVER */ unsigned int vm_scope; + unsigned int vm_min; + unsigned int vm_max; /* info for the hook harnesses */ apr_hash_t *hooks; /* */ @@ -120,6 +125,11 @@ typedef struct /* 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; @@ -158,8 +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); -AP_LUA_DECLARE(int) ap_lua_ssl_is_https(conn_rec *c); +int ap_lua_ssl_is_https(conn_rec *c); #endif /* !_MOD_LUA_H_ */ diff --git a/modules/mappers/mod_imagemap.c b/modules/mappers/mod_imagemap.c index 1857760b..65b9eb15 100644 --- a/modules/mappers/mod_imagemap.c +++ b/modules/mappers/mod_imagemap.c @@ -686,7 +686,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; } diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 4a3a4573..5ec0d4d0 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; } @@ -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; } @@ -924,7 +924,7 @@ 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, APLOGNO(00682) diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index 4fa90546..a7ac2134 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -1255,7 +1255,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; } diff --git a/modules/metadata/mod_cern_meta.c b/modules/metadata/mod_cern_meta.c index fe704f1a..f06c464c 100644 --- a/modules/metadata/mod_cern_meta.c +++ b/modules/metadata/mod_cern_meta.c @@ -237,7 +237,7 @@ static int scan_meta_file(request_rec *r, apr_file_t *f) } *l++ = '\0'; - while (*l && apr_isspace(*l)) + while (apr_isspace(*l)) ++l; if (!strcasecmp(w, "Content-type")) { diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index 93977390..9ce2fdec 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -722,7 +722,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; diff --git a/modules/metadata/mod_remoteip.c b/modules/metadata/mod_remoteip.c index a0bfd864..b0af3a32 100644 --- a/modules/metadata/mod_remoteip.c +++ b/modules/metadata/mod_remoteip.c @@ -170,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; @@ -192,9 +191,8 @@ 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))) { @@ -205,6 +203,7 @@ static const char *proxylist_read(cmd_parms *cmd, void *cfg, } 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; diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index 65214cd4..a62670e0 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -314,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; } diff --git a/modules/proxy/NWGNUmakefile b/modules/proxy/NWGNUmakefile index fe491c13..dce99d16 100644 --- a/modules/proxy/NWGNUmakefile +++ b/modules/proxy/NWGNUmakefile @@ -165,6 +165,7 @@ TARGET_nlm = \ $(OBJDIR)/proxylbm_hb.nlm \ $(OBJDIR)/proxylbm_req.nlm \ $(OBJDIR)/proxylbm_traf.nlm \ + $(OBJDIR)/proxywstunnel.nlm \ $(EOLIST) # diff --git a/modules/proxy/NWGNUproxy b/modules/proxy/NWGNUproxy index 3c4f112f..443b4cb2 100644 --- a/modules/proxy/NWGNUproxy +++ b/modules/proxy/NWGNUproxy @@ -251,7 +251,7 @@ 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)>> $@ @@ -283,6 +283,7 @@ $(OBJDIR)/mod_proxy.imp: @echo $(DL) ap_proxy_connect_to_backend,$(DL)>> $@ @echo $(DL) ap_proxy_connection_create,$(DL)>> $@ @echo $(DL) ap_proxy_cookie_reverse_map,$(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)>> $@ @@ -300,6 +301,7 @@ $(OBJDIR)/mod_proxy.imp: @echo $(DL) ap_proxy_is_word,$(DL)>> $@ @echo $(DL) ap_proxy_location_reverse_map,$(DL)>> $@ @echo $(DL) ap_proxy_parse_wstatus,$(DL)>> $@ + @echo $(DL) ap_proxy_pass_brigade,$(DL)>> $@ @echo $(DL) ap_proxy_post_request,$(DL)>> $@ @echo $(DL) ap_proxy_pre_http_request,$(DL)>> $@ @echo $(DL) ap_proxy_pre_request,$(DL)>> $@ diff --git a/modules/proxy/NWGNUproxywstunnel b/modules/proxy/NWGNUproxywstunnel new file mode 100644 index 00000000..ce84ce45 --- /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_utils.c b/modules/proxy/ajp_utils.c index 567af918..2fe9f72d 100644 --- a/modules/proxy/ajp_utils.c +++ b/modules/proxy/ajp_utils.c @@ -113,7 +113,7 @@ cleanup: 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/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c index 26c81584..77fb994f 100644 --- a/modules/proxy/balancers/mod_lbmethod_heartbeat.c +++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.c @@ -407,7 +407,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; } @@ -442,7 +442,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/config.m4 b/modules/proxy/config.m4 index e91cbf4c..ce625910 100644 --- a/modules/proxy/config.m4 +++ b/modules/proxy/config.m4 @@ -20,6 +20,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,6 +34,7 @@ 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 @@ -52,6 +54,7 @@ APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module. Requires enable_proxy_fdpass=no fi ],proxy) +APACHE_MODULE(proxy_wstunnel, Apache proxy Websocket Tunnel module. Requires and is enabled by --enable-proxy., $proxy_wstunnel_objs, , $proxy_mods_enable,, proxy) APACHE_MODULE(proxy_ajp, Apache proxy AJP module. Requires and is enabled by --enable-proxy., $proxy_ajp_objs, , $proxy_mods_enable,, proxy) APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module. Requires and is enabled by --enable-proxy., $proxy_balancer_objs, , $proxy_mods_enable,, proxy) diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 0bd3a6c9..0ee2ff35 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -36,6 +36,9 @@ APR_DECLARE_OPTIONAL_FN(char *, ssl_var_lookup, #define MAX(x,y) ((x) >= (y) ? (x) : (y)) #endif +static const char * const proxy_id = "proxy"; +apr_global_mutex_t *proxy_mutex = NULL; + /* * A Web proxy module. Stages: * @@ -383,6 +386,14 @@ 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'; @@ -871,7 +882,7 @@ 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; @@ -883,8 +894,14 @@ static int proxy_handler(request_rec *r) /* 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; @@ -905,7 +922,7 @@ static int proxy_handler(request_rec *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?"); } } @@ -918,7 +935,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) { @@ -1160,6 +1177,10 @@ static void * create_proxy_config(apr_pool_t *p, server_rec *s) 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; @@ -1175,7 +1196,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; } @@ -1186,13 +1207,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; @@ -1220,7 +1258,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, @@ -1890,6 +1928,26 @@ static const char *set_persist(cmd_parms *parms, void *dummy, int 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; @@ -2279,6 +2337,12 @@ static const command_rec proxy_cmds[] = "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, @@ -2341,6 +2405,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); @@ -2443,6 +2514,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; @@ -2500,11 +2580,19 @@ static void child_init(apr_pool_t *p, server_rec *s) /* * 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 */ diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index 5074aa16..81fd14c1 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -164,7 +164,7 @@ typedef struct { status_full } proxy_status; /* Status display options */ apr_sockaddr_t *source_address; - apr_global_mutex_t *mutex; /* global lock (needed??) */ + apr_global_mutex_t *mutex; /* global lock, for pool, etc */ ap_slotmem_instance_t *bslot; /* balancers shm data - runtime */ ap_slotmem_provider_t *storage; @@ -179,6 +179,10 @@ typedef struct { 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; @@ -446,6 +450,7 @@ struct proxy_balancer { 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 { @@ -915,6 +920,56 @@ 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. + * @parama 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)); + #define PROXY_LBMETHOD "proxylbmethod" /* The number of dynamic workers that can be added when reconfiguring. diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index cd9987e1..0f45be7a 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -649,6 +649,17 @@ static int proxy_balancer_post_request(proxy_worker *worker, } } + if (balancer->failontimeout + && (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 'failonstatus' parameter being set", + balancer->s->name, worker->s->name); + worker->s->status |= PROXY_WORKER_IN_ERROR; + worker->s->error_time = apr_time_now(); + + } + 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); @@ -769,9 +780,9 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog, continue; } if (conf->bal_persist) { - type = AP_SLOTMEM_TYPE_PREGRAB | AP_SLOTMEM_TYPE_PERSIST; + type = AP_SLOTMEM_TYPE_PERSIST; } else { - type = AP_SLOTMEM_TYPE_PREGRAB; + type = 0; } if (conf->balancers->nelts) { conf->max_balancers = conf->balancers->nelts + conf->bgrowth; @@ -1160,7 +1171,7 @@ 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); + 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_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(01194) @@ -1675,8 +1686,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_http.c b/modules/proxy/mod_proxy_http.c index 07b5408d..cffad2e7 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); @@ -178,33 +181,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) @@ -250,44 +227,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_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; - } - } - apr_brigade_cleanup(bb); - return OK; -} #define MAX_MEM_SPOOL 16384 @@ -366,7 +305,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; } @@ -412,7 +351,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; } @@ -422,7 +361,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; @@ -511,7 +450,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 ; } @@ -541,7 +480,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; @@ -685,7 +624,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)); } /* @@ -752,257 +691,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 = 1; } 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 = 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); - - /* 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", - 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); - /* - * 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, origin->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... */ @@ -1576,6 +1289,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, "error reading status line from remote " "server %s:%d", backend->hostname, backend->port); if (APR_STATUS_IS_TIMEUP(rc)) { + apr_table_set(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"); @@ -1754,11 +1468,10 @@ 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 */ - if (ap_find_token(p, apr_table_get(r->headers_out, "Connection"), - "close")) - backend->close = 1; - ap_proxy_clear_connection(p, r->headers_out); + backend->close = ap_proxy_clear_connection_fn(r, r->headers_out); + if ((buf = apr_table_get(r->headers_out, "Content-Type"))) { ap_set_content_type(r, apr_pstrdup(p, buf)); } @@ -1770,6 +1483,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); @@ -1837,12 +1551,16 @@ 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, "HTTP: received interim %d response", r->status); - if (!policy || !strcasecmp(policy, "RFC")) { + 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 @@ -2294,8 +2012,34 @@ cleanup: } 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_wstunnel.c b/modules/proxy/mod_proxy_wstunnel.c new file mode 100644 index 00000000..365a2054 --- /dev/null +++ b/modules/proxy/mod_proxy_wstunnel.c @@ -0,0 +1,399 @@ +/* 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; +} + + +static int proxy_wstunnel_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, AP_IOBUFSIZE); + 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, APLOGNO(02440) + "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, APLOGNO(02441) + "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(02442) + "error on %s - ap_get_brigade", + name); + } + } while (rv == APR_SUCCESS); + + if (APR_STATUS_IS_EAGAIN(rv)) { + rv = APR_SUCCESS; + } + return rv; +} + +/* Search thru the input filters and remove the reqtimeout one */ +static void remove_reqtimeout(ap_filter_t *next) +{ + ap_filter_t *reqto = NULL; + ap_filter_rec_t *filter; + + filter = ap_get_input_filter_handle("reqtimeout"); + if (!filter) { + return; + } + + while (next) { + if (next->frec == filter) { + reqto = next; + break; + } + next = next->next; + } + if (reqto) { + ap_remove_input_filter(reqto); + } +} + +/* + * process the request and write the response. + */ +static int ap_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_SUCCESS; + 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; + int client_error = 0; + 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); + + 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_pstrcat(p, "Upgrade: WebSocket", CRLF, "Connection: Upgrade", CRLF, 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); + + if ((rv = ap_proxy_pass_brigade(c->bucket_alloc, r, conn, backconn, + header_brigade, 1)) != OK) + return rv; + + 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; + pollfd.desc.s = sock; + pollfd.client_data = NULL; + apr_pollset_add(pollset, &pollfd); + + pollfd.desc.s = client_socket; + apr_pollset_add(pollset, &pollfd); + + + 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; + + remove_reqtimeout(r->input_filters); + + while (1) { /* Infinite loop until error (one side closes the connection) */ + if ((rv = apr_pollset_poll(pollset, -1, &pollcnt, &signalled)) + != 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_DEBUG, 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) { + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02446) + "sock was readable"); + rv = proxy_wstunnel_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, APLOGNO(02447) + "err/hup on backconn"); + } + if (rv != APR_SUCCESS) + client_error = 1; + } + else if (cur->desc.s == client_socket) { + pollevent = cur->rtnevents; + if (pollevent & APR_POLLIN) { + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02448) + "client was readable"); + rv = proxy_wstunnel_transfer(r, c, backconn, bb, "client"); + } + } + else { + rv = APR_EBADF; + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02449) + "unknown socket in pollset"); + } + + } + if (rv != APR_SUCCESS) { + break; + } + } + + ap_log_rerror(APLOG_MARK, APLOG_TRACE2, 0, r, + "finished with poll() - cleaning up"); + + if (client_error) { + return HTTP_INTERNAL_SERVER_ERROR; + } + 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; + char *scheme; + int retry; + conn_rec *c = r->connection; + apr_pool_t *p = r->pool; + apr_uri_t *uri; + + if (strncasecmp(url, "wss:", 4) == 0) { + scheme = "WSS"; + } + 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; + } + + 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 = 0; + 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; + } + + /* Step Three: Process the Request */ + status = ap_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.dsp b/modules/proxy/mod_proxy_wstunnel.dsp new file mode 100644 index 00000000..7123bd65 --- /dev/null +++ b/modules/proxy/mod_proxy_wstunnel.dsp @@ -0,0 +1,123 @@ +# 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_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_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_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 + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "mod_proxy_wstunnel - 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_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_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_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_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_proxy_wstunnel - 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_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_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_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_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 + +!ENDIF + +# Begin Target + +# 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_proxy_wstunnel.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter ".h" +# Begin Source File + +SOURCE=.\mod_proxy.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\build\win32\httpd.rc +# End Source File +# End Target +# End Project diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 5ab5d914..67dc9394 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -69,6 +69,8 @@ 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); @@ -1730,12 +1732,14 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(00927) "initializing worker %s local", worker->s->name); + 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_ERR, 0, s, APLOGNO(00928) "can not create worker thread mutex"); + apr_global_mutex_unlock(proxy_mutex); return rv; } } @@ -1744,6 +1748,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser if (worker->cp == NULL) { 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; } @@ -1779,6 +1784,8 @@ PROXY_DECLARE(apr_status_t) ap_proxy_initialize_worker(proxy_worker *worker, ser "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); @@ -2316,7 +2323,7 @@ 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) { break; @@ -2766,15 +2773,18 @@ PROXY_DECLARE(apr_status_t) ap_proxy_sync_balancer(proxy_balancer *b, server_rec } 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) { + 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; } @@ -2834,7 +2844,365 @@ PROXY_DECLARE(proxy_balancer_shared *) ap_proxy_find_balancershm(ap_slotmem_prov 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++; + } + 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 *headers_in_copy; + 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); + + /* 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", + 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); + /* + * 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(r, 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); + } + 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); + 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; + } + } + apr_brigade_cleanup(bb); + return OK; +} + 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/session/NWGNUmakefile b/modules/session/NWGNUmakefile index 8adaac59..85f3a311 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/mod_session.c b/modules/session/mod_session.c index a3354a59..7213eb3c 100644 --- a/modules/session/mod_session.c +++ b/modules/session/mod_session.c @@ -132,8 +132,6 @@ static apr_status_t ap_session_load(request_rec * r, session_rec ** z) 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 { @@ -446,6 +444,7 @@ static apr_status_t session_output_filter(ap_filter_t * f, } if (override) { z->encoded = override; + z->dirty = 1; session_identity_decode(r, z); } } diff --git a/modules/session/mod_session_cookie.c b/modules/session/mod_session_cookie.c index 15b3d9c6..6a02322b 100644 --- a/modules/session/mod_session_cookie.c +++ b/modules/session/mod_session_cookie.c @@ -157,7 +157,6 @@ static apr_status_t 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_crypto.c b/modules/session/mod_session_crypto.c index f48ff038..03dbba61 100644 --- a/modules/session/mod_session_crypto.c +++ b/modules/session/mod_session_crypto.c @@ -556,9 +556,8 @@ static const char *set_crypto_passphrase_file(cmd_parms *cmd, void *config, 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: %s", - cmd->cmd->name, filename, - apr_strerror(rv, buffer, sizeof(buffer))); + 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))) { diff --git a/modules/session/mod_session_dbd.c b/modules/session/mod_session_dbd.c index d6349a8d..a6ab40ea 100644 --- a/modules/session/mod_session_dbd.c +++ b/modules/session/mod_session_dbd.c @@ -230,12 +230,11 @@ static apr_status_t session_dbd_load(request_rec * r, session_rec ** z) 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)); - 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; @@ -250,8 +249,8 @@ static apr_status_t 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; @@ -272,22 +271,24 @@ 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, APLOGNO(01857) - "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) { @@ -301,11 +302,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, 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; } @@ -320,7 +321,7 @@ static apr_status_t dbd_save(request_rec * r, const char *key, const char *val, 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; @@ -397,27 +398,38 @@ static apr_status_t dbd_clean(apr_pool_t *p, server_rec *s) 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; @@ -425,13 +437,13 @@ static apr_status_t 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); } @@ -446,7 +458,7 @@ static apr_status_t 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; } diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c index 2edcea7f..aac96e23 100644 --- a/modules/slotmem/mod_slotmem_shm.c +++ b/modules/slotmem/mod_slotmem_shm.c @@ -91,7 +91,7 @@ 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; + struct shmid_ds shmbuf = { { 0 } }; key_t shmkey; int shmid; @@ -647,7 +647,7 @@ static apr_status_t slotmem_fgrab(ap_slotmem_instance_t *slot, unsigned int id) } if (id >= slot->desc.num) { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02236) + 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)); diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 12d473ba..a43f656e 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -200,9 +200,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 diff --git a/modules/ssl/ssl_engine_config.c b/modules/ssl/ssl_engine_config.c index 658ef6b3..1ab5bf37 100644 --- a/modules/ssl/ssl_engine_config.c +++ b/modules/ssl/ssl_engine_config.c @@ -207,6 +207,7 @@ 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; + sc->proxy_ssl_check_peer_name = SSL_ENABLED_UNSET; #ifndef OPENSSL_NO_TLSEXT sc->strict_sni_vhost_check = SSL_ENABLED_UNSET; #endif @@ -336,6 +337,7 @@ void *ssl_config_server_merge(apr_pool_t *p, void *basev, void *addv) cfgMergeBool(insecure_reneg); cfgMerge(proxy_ssl_check_peer_expire, SSL_ENABLED_UNSET); cfgMerge(proxy_ssl_check_peer_cn, SSL_ENABLED_UNSET); + cfgMerge(proxy_ssl_check_peer_name, SSL_ENABLED_UNSET); #ifndef OPENSSL_NO_TLSEXT cfgMerge(strict_sni_vhost_check, SSL_ENABLED_UNSET); #endif @@ -1632,6 +1634,15 @@ 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 diff --git a/modules/ssl/ssl_engine_init.c b/modules/ssl/ssl_engine_init.c index be891d62..9f8dcc8f 100644 --- a/modules/ssl/ssl_engine_init.c +++ b/modules/ssl/ssl_engine_init.c @@ -91,7 +91,7 @@ static int ssl_tmp_key_init_rsa(server_rec *s, if (FIPS_mode() && bits < 1024) { mc->pTmpKeys[idx] = NULL; - ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01877) + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01877) "Init: Skipping generating temporary " "%d bit RSA private key in FIPS mode", bits); return OK; @@ -140,7 +140,7 @@ static int ssl_tmp_key_init_dh(server_rec *s, if (FIPS_mode() && bits < 1024) { mc->pTmpKeys[idx] = NULL; - ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01880) + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01880) "Init: Skipping generating temporary " "%d bit DH parameters in FIPS mode", bits); return OK; @@ -354,7 +354,7 @@ int ssl_init_Module(apr_pool_t *p, apr_pool_t *plog, } } else { - ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, s, APLOGNO(01886) + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(01886) "SSL FIPS mode disabled"); } #endif @@ -1110,7 +1110,6 @@ static void ssl_check_public_cert(server_rec *s, int type) { int is_ca, pathlen; - apr_array_header_t *ids; if (!cert) { return; @@ -1143,56 +1142,12 @@ static void ssl_check_public_cert(server_rec *s, } } - /* - * 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). - */ - 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, APLOGNO(01908) - "%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, APLOGNO(01909) - "%s certificate configured for %s does NOT include " - "an ID which matches the server name", - ssl_asn1_keystr(type), (mySrvConfig(s))->vhost_id); - } + if (SSL_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 certificate configured for %s does NOT include " + "an ID which matches the server name", + ssl_asn1_keystr(type), (mySrvConfig(s))->vhost_id); } } @@ -1354,7 +1309,8 @@ 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, APLOGNO(02252) "incomplete client cert configured for SSL proxy " @@ -1362,6 +1318,15 @@ static void ssl_init_proxy_certs(server_rec *s, ssl_die(s); return; } + + 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); + ssl_die(s); + return; + } } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(02207) @@ -1374,7 +1339,11 @@ static void ssl_init_proxy_certs(server_rec *s, return; } - /* 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(); diff --git a/modules/ssl/ssl_engine_io.c b/modules/ssl/ssl_engine_io.c index 83f3ab7f..d135bd38 100644 --- a/modules/ssl/ssl_engine_io.c +++ b/modules/ssl/ssl_engine_io.c @@ -1053,6 +1053,7 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx) #endif const char *hostname_note = apr_table_get(c->notes, "proxy-request-hostname"); + BOOL proxy_ssl_check_peer_ok = TRUE; sc = mySrvConfig(server); #ifndef OPENSSL_NO_TLSEXT @@ -1090,26 +1091,32 @@ 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)) { + 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) && + hostname_note) { + apr_table_unset(c->notes, "proxy-request-hostname"); + if (!cert + || SSL_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_FALSE) && hostname_note) { const char *hostname; int match = 0; @@ -1128,17 +1135,25 @@ static apr_status_t ssl_io_filter_handshake(ssl_filter_ctx_t *filter_ctx) } 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 (cert) { + X509_free(cert); + } + + if (proxy_ssl_check_peer_ok != TRUE) { + /* 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; } diff --git a/modules/ssl/ssl_private.h b/modules/ssl/ssl_private.h index a9269680..080ecef3 100644 --- a/modules/ssl/ssl_private.h +++ b/modules/ssl/ssl_private.h @@ -687,6 +687,7 @@ struct SSLSrvConfigRec { modssl_ctx_t *proxy; ssl_enabled_t proxy_ssl_check_peer_expire; ssl_enabled_t proxy_ssl_check_peer_cn; + ssl_enabled_t proxy_ssl_check_peer_name; #ifndef OPENSSL_NO_TLSEXT ssl_enabled_t strict_sni_vhost_check; #endif @@ -782,6 +783,7 @@ const char *ssl_cmd_SSLSessionTicketKeyFile(cmd_parms *cmd, void *dcfg, const ch #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); diff --git a/modules/ssl/ssl_util_ocsp.c b/modules/ssl/ssl_util_ocsp.c index e5c5e58d..757df05f 100644 --- a/modules/ssl/ssl_util_ocsp.c +++ b/modules/ssl/ssl_util_ocsp.c @@ -236,7 +236,7 @@ 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)) { + if (rv == APR_EOF) { ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(01984) "OCSP response: got EOF"); break; @@ -246,6 +246,12 @@ static OCSP_RESPONSE *read_response(apr_socket_t *sd, BIO *bio, conn_rec *c, "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, APLOGNO(01986) diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c index 48b561dc..a8c36adb 100644 --- a/modules/ssl/ssl_util_ssl.c +++ b/modules/ssl/ssl_util_ssl.c @@ -338,6 +338,82 @@ BOOL SSL_X509_getIDs(apr_pool_t *p, X509 *x509, apr_array_header_t **ids) return apr_is_empty_array(*ids) ? FALSE : TRUE; } +/* + * 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 SSL_X509_match_name(apr_pool_t *p, X509 *x509, const char *name, + BOOL allow_wildcard, server_rec *s) +{ + BOOL matched = FALSE; + apr_array_header_t *ids; + + /* + * 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). + */ + + if (SSL_X509_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; + } + + if (s) { + ap_log_error(APLOG_MARK, APLOG_TRACE3, 0, s, + "[%s] SSL_X509_match_name: expecting name '%s', " + "%smatched by ID '%s'", + (mySrvConfig(s))->vhost_id, name, + matched == TRUE ? "" : "NOT ", id[i]); + } + + if (matched == TRUE) { + break; + } + } + + } + + 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 matched; +} + /* _________________________________________________________________ ** ** Low-Level CA Certificate Loading @@ -479,14 +555,15 @@ int SSL_CTX_use_certificate_chain( char *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 1688bb67..4b882db2 100644 --- a/modules/ssl/ssl_util_ssl.h +++ b/modules/ssl/ssl_util_ssl.h @@ -68,6 +68,7 @@ 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 *, int); BOOL SSL_X509_getIDs(apr_pool_t *, X509 *, apr_array_header_t **); +BOOL SSL_X509_match_name(apr_pool_t *, X509 *, const char *, BOOL, server_rec *); 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 *); diff --git a/modules/ssl/ssl_util_stapling.c b/modules/ssl/ssl_util_stapling.c index 89be7f53..0387cf92 100644 --- a/modules/ssl/ssl_util_stapling.c +++ b/modules/ssl/ssl_util_stapling.c @@ -449,7 +449,7 @@ static BOOL stapling_renew_response(server_rec *s, modssl_ctx_t *mctx, SSL *ssl, stapling_check_response(s, mctx, cinf, *prsp, &ok); if (ok == FALSE) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01943) - "stapling_renew_response: error in retreived response!"); + "stapling_renew_response: error in retrieved response!"); } } else { diff --git a/os/unix/unixd.c b/os/unix/unixd.c index 2a953f0f..a86630f3 100644 --- a/os/unix/unixd.c +++ b/os/unix/unixd.c @@ -241,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; diff --git a/os/win32/BaseAddr.ref b/os/win32/BaseAddr.ref index f8742cf1..c426d44d 100644 --- a/os/win32/BaseAddr.ref +++ b/os/win32/BaseAddr.ref @@ -96,25 +96,28 @@ 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_reqtimeout.so 0x6F7B0000 0x00010000 -mod_reflector.so 0x6F7A0000 0x00010000 -mod_slotmem_plain.so 0x6F790000 0x00010000 -mod_slotmem_shm.so 0x6F780000 0x00010000 -mod_authn_socache.so 0x6F770000 0x00010000 -mod_proxy_express.so 0x6F760000 0x00010000 -mod_log_debug.so 0x6F750000 0x00010000 -mod_proxy_html.so 0x6F740000 0x00010000 -mod_xml2enc.so 0x6F730000 0x00010000 -mod_data.so 0x6F720000 0x00010000 -mod_allowmethods.so 0x6F710000 0x00010000 +mod_lua.so 0x6F850000 0x00020000 +mod_ratelimit.so 0x6F840000 0x00010000 +mod_remoteip.so 0x6F830000 0x00010000 +mod_lbmethod_bybusyness.so 0x6F820000 0x00010000 +mod_lbmethod_byrequests.so 0x6F810000 0x00010000 +mod_lbmethod_bytraffic.so 0x6F800000 0x00010000 +mod_lbmethod_heartbeat.so 0x6F7F0000 0x00010000 +mod_heartbeat.so 0x6F7E0000 0x00010000 +mod_heartmonitor.so 0x6F7D0000 0x00010000 +mod_watchdog.so 0x6F7C0000 0x00010000 +mod_proxy_scgi.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 +mod_data.so 0x6F710000 0x00010000 +mod_allowmethods.so 0x6F700000 0x00010000 +mod_macro.so 0x6F6F0000 0x00010000 +mod_cache_socache.so 0x6F6E0000 0x00010000 +mod_proxy_wstunnel.so 0x6F6D0000 0x00010000 diff --git a/server/config.c b/server/config.c index bc0804a4..c1aae172 100644 --- a/server/config.c +++ b/server/config.c @@ -599,7 +599,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; } @@ -623,8 +624,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*/ @@ -1796,9 +1798,8 @@ 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); } parms.config_file = cfp; @@ -1850,9 +1851,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)); @@ -1937,9 +1937,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)); diff --git a/server/core.c b/server/core.c index 6f6d5686..fb5e34a0 100644 --- a/server/core.c +++ b/server/core.c @@ -1489,8 +1489,8 @@ static const char *set_error_document(cmd_parms *cmd, void *conf_, if (error_number == 401 && what == REMOTE_PATH) { ap_log_error(APLOG_MARK, APLOG_NOTICE, 0, cmd->server, APLOGNO(00113) - "cannot use a full URL in a 401 ErrorDocument " - "directive --- ignoring!"); + "%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) { @@ -1500,7 +1500,7 @@ static const char *set_error_document(cmd_parms *cmd, void *conf_, RESPONSE_CODES); } - if (strcmp(msg, "default") == 0) { + if (strcasecmp(msg, "default") == 0) { /* special case: ErrorDocument 404 default restores the * canned server error response */ @@ -4768,13 +4768,18 @@ 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); } @@ -4790,6 +4795,12 @@ static apr_status_t core_insert_network_bucket(conn_rec *c, 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); @@ -4866,7 +4877,8 @@ static void register_hooks(apr_pool_t *p) 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); + /* register the core's insert_filter hook and register core-provided * filters */ diff --git a/server/log.c b/server/log.c index 05d99ad6..f9680a8b 100644 --- a/server/log.c +++ b/server/log.c @@ -1552,11 +1552,10 @@ 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, APLOGNO(00103) - "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; @@ -1580,11 +1579,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, APLOGNO(00104) - "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); } } @@ -1595,7 +1593,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) { @@ -1605,8 +1603,8 @@ 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) { + 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'", @@ -1616,13 +1614,12 @@ static void piped_log_maintenance(int reason, void *data, apr_wait_t status) 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, APLOGNO(00107) - "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; diff --git a/server/mpm/event/event.c b/server/mpm/event/event.c index 1b42e696..c64b08f5 100644 --- a/server/mpm/event/event.c +++ b/server/mpm/event/event.c @@ -2126,7 +2126,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; @@ -3235,6 +3241,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/worker/worker.c b/server/mpm/worker/worker.c index 548fcaec..4d7a92a7 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -1276,7 +1276,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; diff --git a/server/protocol.c b/server/protocol.c index e1ef2049..a0b32464 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -185,9 +185,6 @@ 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. @@ -286,9 +283,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) { @@ -964,7 +958,7 @@ request_rec *ap_read_request(conn_rec *conn) || r->status == HTTP_BAD_REQUEST) { if (r->status == HTTP_REQUEST_URI_TOO_LARGE) { ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(00565) - "request failed: URI too long (longer than %d)", + "request failed: client's request-line exceeds LimitRequestLine (longer than %d)", r->server->limit_req_line); } else if (r->method == NULL) { @@ -1717,7 +1711,7 @@ 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; } diff --git a/server/request.c b/server/request.c index d26d4691..1f4d9927 100644 --- a/server/request.c +++ b/server/request.c @@ -69,6 +69,8 @@ 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) ) AP_IMPLEMENT_HOOK_RUN_FIRST(int,translate_name, @@ -90,6 +92,11 @@ 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) static int auth_internal_per_conf = 0; static int auth_internal_per_conf_hooks = 0; @@ -191,6 +198,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))) { @@ -602,7 +613,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; @@ -668,9 +679,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 @@ -1085,9 +1095,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 diff --git a/server/util.c b/server/util.c index d77719eb..e0ba5c28 100644 --- a/server/util.c +++ b/server/util.c @@ -752,7 +752,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; @@ -783,7 +783,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) { @@ -815,7 +815,7 @@ 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; @@ -1286,27 +1286,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 */ @@ -1374,7 +1405,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; } @@ -1388,6 +1420,34 @@ 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); +} /* Retrieve a token, spacing over it and returning a pointer to * the first non-white byte afterwards. Note that these tokens @@ -1405,7 +1465,7 @@ AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line, /* Find first non-white byte */ - while (*ptr && apr_isspace(*ptr)) + while (apr_isspace(*ptr)) ++ptr; tok_start = ptr; @@ -1427,7 +1487,7 @@ AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line, /* Advance accept_line pointer to the next non-white byte */ - while (*ptr && apr_isspace(*ptr)) + while (apr_isspace(*ptr)) ++ptr; *accept_line = ptr; @@ -1849,16 +1909,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) { @@ -2886,3 +2963,45 @@ AP_DECLARE(void) ap_get_loadavg(ap_loadavg_t *ld) } #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); +} diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index b350cfc7..e3adf88a 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -25,9 +25,12 @@ #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 /* for INT_MAX */ @@ -1019,6 +1022,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) @@ -1575,9 +1615,12 @@ static const struct expr_provider_single string_func_providers[] = { { 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 }, diff --git a/server/util_filter.c b/server/util_filter.c index 7121eced..01eb5335 100644 --- a/server/util_filter.c +++ b/server/util_filter.c @@ -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 diff --git a/server/util_script.c b/server/util_script.c index 5708c086..12a056f5 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -565,7 +565,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; } diff --git a/support/htdbm.c b/support/htdbm.c index a99a2322..1452d7a0 100644 --- a/support/htdbm.c +++ b/support/htdbm.c @@ -110,6 +110,7 @@ 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); diff --git a/support/htdigest.c b/support/htdigest.c index 6a0e26f1..f76036d7 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -96,12 +96,15 @@ static int get_line(char *s, int n, apr_file_t *f) 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/htpasswd.c b/support/htpasswd.c index 51219c0d..11023499 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -67,6 +67,7 @@ #define APHTP_NEWFILE 1 #define APHTP_NOFILE 2 #define APHTP_DELUSER 4 +#define APHTP_VERIFY 8 apr_file_t *ftemp = NULL; @@ -92,8 +93,8 @@ static int mkrecord(struct passwd_ctx *ctx, char *user) static void usage(void) { apr_file_printf(errfile, "Usage:" NL - "\thtpasswd [-cimBdpsD] [-C cost] passwordfile username" NL - "\thtpasswd -b[cmBdpsD] [-C cost] passwordfile username password" 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 @@ -110,6 +111,7 @@ static void usage(void) " -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 " @@ -155,7 +157,7 @@ static void terminate(void) } static void check_args(int argc, const char *const argv[], - struct passwd_ctx *ctx, int *mask, char **user, + struct passwd_ctx *ctx, unsigned *mask, char **user, char **pwfilename) { const char *arg; @@ -171,7 +173,7 @@ static void check_args(int argc, const char *const argv[], if (rv != APR_SUCCESS) exit(ERR_SYNTAX); - while ((rv = apr_getopt(state, "cnmspdBbDiC:", &opt, &opt_arg)) == APR_SUCCESS) { + while ((rv = apr_getopt(state, "cnmspdBbDiC:v", &opt, &opt_arg)) == APR_SUCCESS) { switch (opt) { case 'c': *mask |= APHTP_NEWFILE; @@ -183,6 +185,9 @@ static void check_args(int argc, const char *const argv[], case 'D': *mask |= APHTP_DELUSER; break; + case 'v': + *mask |= APHTP_VERIFY; + break; default: ret = parse_common_options(ctx, opt, opt_arg); if (ret) { @@ -196,18 +201,15 @@ static void check_args(int argc, const char *const argv[], 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 @@ -246,6 +248,25 @@ static void check_args(int argc, const char *const argv[], } } +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; +} + /* * Let's do it. We end up doing a lot of file opening and closing, * but what do we care? This application isn't run constantly. @@ -253,7 +274,6 @@ static void check_args(int argc, const char *const argv[], int main(int argc, const char * const argv[]) { apr_file_t *fpw = NULL; - const char *errstr = NULL; char line[MAX_STRING_LEN]; char *pwfilename = NULL; char *user = NULL; @@ -262,7 +282,7 @@ int main(int argc, const char * const argv[]) char *scratch, cp[MAX_STRING_LEN]; int found = 0; int i; - int mask = 0; + unsigned mask = 0; apr_pool_t *pool; int existing_file = 0; struct passwd_ctx ctx = { 0 }; @@ -274,6 +294,7 @@ 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; @@ -341,10 +362,10 @@ 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)) { + if ((mask & (APHTP_DELUSER|APHTP_VERIFY)) == 0) { i = mkrecord(&ctx, user); if (i != 0) { - apr_file_printf(errfile, "%s: %s" NL, argv[0], errstr); + apr_file_printf(errfile, "%s: %s" NL, argv[0], ctx.errstr); exit(i); } if (mask & APHTP_NOFILE) { @@ -353,21 +374,23 @@ int main(int argc, const char * const argv[]) } } - /* - * 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); + } } /* @@ -418,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, ctx.out); - 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, ctx.out); + 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/httxt2dbm.c b/support/httxt2dbm.c index 12606c3a..387418bb 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; } @@ -157,7 +156,7 @@ static apr_status_t to_dbm(apr_dbm_t *dbm, apr_file_t *fp, apr_pool_t *pool) 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/passwd_common.c b/support/passwd_common.c index ab720279..343fa790 100644 --- a/support/passwd_common.c +++ b/support/passwd_common.c @@ -24,8 +24,10 @@ #include "apr_md5.h" #include "apr_sha1.h" -#include +#if APR_HAVE_TIME_H +#include +#endif #if APR_HAVE_CRYPT_H #include #endif @@ -38,14 +40,34 @@ #if APR_HAVE_UNISTD_H #include #endif +#if APR_HAVE_IO_H +#include +#endif -#ifdef WIN32 -#include -#define unlink _unlink +#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) { @@ -85,6 +107,8 @@ static int generate_salt(char *s, size_t size, const char **errstr, 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); @@ -95,17 +119,17 @@ void putline(apr_file_t *f, const char *l) int get_password(struct passwd_ctx *ctx) { + char buf[MAX_STRING_LEN + 1]; if (ctx->passwd_src == PW_STDIN) { - char *buf = ctx->out; 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, ctx->out_len - 1, + if (apr_file_read_full(file_stdin, buf, sizeof(buf) - 1, &nread) != APR_EOF - || nread == ctx->out_len - 1) { + || nread == sizeof(buf) - 1) { goto err_too_long; } buf[nread] = '\0'; @@ -115,21 +139,30 @@ int get_password(struct passwd_ctx *ctx) 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 { - char buf[MAX_STRING_LEN + 1]; apr_size_t bufsize = sizeof(buf); - if (apr_password_get("New password: ", ctx->out, &ctx->out_len) != 0) + 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->out, buf) != 0) { + if (strcmp(ctx->passwd, buf) != 0) { ctx->errstr = "password verification error"; - memset(ctx->out, '\0', ctx->out_len); + memset(ctx->passwd, '\0', strlen(ctx->passwd)); memset(buf, '\0', sizeof(buf)); return ERR_PWMISMATCH; } - memset(buf, '\0', sizeof(buf)); } + memset(buf, '\0', sizeof(buf)); return 0; err_too_long: @@ -146,7 +179,6 @@ err_too_long: int mkhash(struct passwd_ctx *ctx) { char *pw; - char pwin[MAX_STRING_LEN]; char salt[16]; apr_status_t rv; int ret = 0; @@ -159,14 +191,11 @@ int mkhash(struct passwd_ctx *ctx) "Warning: Ignoring -C argument for this algorithm." NL); } - if (ctx->passwd != NULL) { - pw = ctx->passwd; - } - else { + if (ctx->passwd == NULL) { if ((ret = get_password(ctx)) != 0) return ret; - pw = pwin; } + pw = ctx->passwd; switch (ctx->alg) { case ALG_APSHA: @@ -206,14 +235,13 @@ int mkhash(struct passwd_ctx *ctx) apr_cpystrn(ctx->out, cbuf, ctx->out_len - 1); if (strlen(pw) > 8) { - char *truncpw = strdup(pw); + 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)); - free(truncpw); } break; #endif /* CRYPT_ALGO_SUPPORTED */ diff --git a/support/passwd_common.h b/support/passwd_common.h index 67b66da1..01d56520 100644 --- a/support/passwd_common.h +++ b/support/passwd_common.h @@ -14,6 +14,9 @@ * limitations under the License. */ +#ifndef _PASSWD_COMMON_H +#define _PASSWD_COMMON_H + #include "apr.h" #include "apr_lib.h" #include "apr_strings.h" @@ -80,10 +83,17 @@ struct passwd_ctx { enum { PW_PROMPT = 0, PW_ARG, - PW_STDIN + 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 */ @@ -108,3 +118,6 @@ 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 9bc33285..3f32f3ca 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -99,6 +99,7 @@ struct rotate_config { #if APR_FILES_AS_SOCKETS int create_empty; #endif + int num_files; }; typedef struct rotate_status rotate_status_t; @@ -118,6 +119,7 @@ struct rotate_status { int rotateReason; int tLogEnd; int nMessCount; + int fileNum; }; static rotate_config_t config; @@ -130,9 +132,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] " + "Usage: %s [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] [-c] [-n number] " #else - "Usage: %s [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] " + "Usage: %s [-v] [-l] [-L linkname] [-p prog] [-f] [-t] [-e] [-n number] " #endif "{|(B|K|M|G)} " "[offset minutes from UTC]\n\n", @@ -374,6 +376,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 +410,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 +430,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); @@ -550,9 +565,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': @@ -581,6 +596,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 +628,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); diff --git a/support/suexec.c b/support/suexec.c index 2c4e2c3b..28171253 100644 --- a/support/suexec.c +++ b/support/suexec.c @@ -217,11 +217,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++) { @@ -396,7 +400,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 /* @@ -431,6 +438,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 diff --git a/test/test_limits.c b/test/test_limits.c index e2b5285f..70b8098f 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); -- cgit v1.2.3