diff --git a/docs/manual/bind.html.en b/docs/manual/bind.html.en index c56ee91b67..2ae03d172b 100644 --- a/docs/manual/bind.html.en +++ b/docs/manual/bind.html.en @@ -68,27 +68,21 @@
For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:
--Listen 80 -Listen 8000 -+
Listen 80 +Listen 8000
To make the server accept connections on port 80 for one interface, and port 8000 on another, use
--Listen 192.0.2.1:80 -Listen 192.0.2.5:8000 -+
Listen 192.0.2.1:80 +Listen 192.0.2.5:8000
IPv6 addresses must be enclosed in square brackets, as in the following example:
-- Listen [2001:db8::a00:20ff:fea7:ccea]:80 -+
Listen [2001:db8::a00:20ff:fea7:ccea]:80
Overlapping Listen directives will result in a
@@ -138,10 +132,8 @@ Listen 192.0.2.5:8000
Listen directives, as in the
following examples:
-Listen 0.0.0.0:80 -Listen 192.0.2.1:80 -+
Listen 0.0.0.0:80 +Listen 192.0.2.1:80
If your platform supports it and you want httpd to handle IPv4 and @@ -164,9 +156,7 @@ Listen 192.0.2.1:80
You only need to set the protocol if you are running on non-standard
ports. For example, running an https site on port 8443:
- Listen 192.170.2.1:8443 https -+
Listen 192.170.2.1:8443 https
Par exemple, pour faire en sorte que le serveur accepte des connexions sur les ports 80 et 8000, sur toutes les interfaces, utilisez :
--Listen 80 -Listen 8000 -+
Listen 80 +Listen 8000
Pour faire en sorte que le serveur accepte des connexions sur le port 80 pour une interface, et sur le port 8000 pour une autre interface, utilisez :
--Listen 192.0.2.1:80 -Listen 192.0.2.5:8000 -+
Listen 192.0.2.1:80 +Listen 192.0.2.5:8000
Les adresses IPv6 doivent être mises entre crochets, comme dans l'exemple suivant :
-- Listen [2001:db8::a00:20ff:fea7:ccea]:80 -+
Listen [2001:db8::a00:20ff:fea7:ccea]:80
Des directives Listen
@@ -148,10 +142,8 @@ Listen 192.0.2.5:8000
Listen, comme dans l'exemple
suivant :
-Listen 0.0.0.0:80 -Listen 192.0.2.1:80 -+
Listen 0.0.0.0:80 +Listen 192.0.2.1:80
Si votre plateforme le supporte et si vous souhaitez que httpd gère
@@ -176,9 +168,7 @@ Listen 192.0.2.1:80
des ports non standards. Par exemple, pour travailler en
https sur le port 8443 :
- Listen 192.170.2.1:8443 https -+
Listen 192.170.2.1:8443 https
Typically the module will be configured as so;
--CacheRoot "/var/cache/apache/" +CacheRoot "/var/cache/apache/" CacheEnable disk / CacheDirLevels 2 -CacheDirLength 1 -+CacheDirLength 1
Importantly, as the cached files are locally stored, operating system @@ -618,9 +616,7 @@ CacheDirLength 1 instructs httpd to open the file when it is started and to re-use this file-handle for all subsequent access to this file.
-- CacheFile /usr/local/apache2/htdocs/index.html -+
CacheFile /usr/local/apache2/htdocs/index.html
If you intend to cache a large number of files in this manner, you @@ -672,8 +668,7 @@ CacheDirLength 1 the difference in the time it takes to read a file for the first time and the second time;
--colm@coroebus:~$ time cat testfile > /dev/null +start time (using the mmap system call). httpd will use the in-memory contents for all subsequent accesses to this file. -colm@coroebus:~$ time cat testfile > /dev/null real 0m0.065s user 0m0.000s sys 0m0.001s @@ -710,9 +705,7 @@ sys 0m0.000s- MMapFile /usr/local/apache2/htdocs/index.html -+MMapFile /usr/local/apache2/htdocs/index.htmlAs with the diff --git a/docs/manual/caching.html.fr b/docs/manual/caching.html.fr index 5f2db403f5..6dd043ee9d 100644 --- a/docs/manual/caching.html.fr +++ b/docs/manual/caching.html.fr @@ -465,12 +465,10 @@ Vary: negotiate,accept-language,accept-charset
En général, le module se configure comme suit :
--CacheRoot "/var/cache/apache/" +CacheRoot "/var/cache/apache/" CacheEnable disk / CacheDirLevels 2 -CacheDirLength 1 -+CacheDirLength 1Il est important de savoir que, les fichiers mis en cache étant stockés @@ -676,9 +674,7 @@ CacheDirLength 1 réutiliser le descripteur de fichier mis en cache pour tous les accès futurs à ce fichier.
-- CacheFile /usr/local/apache2/htdocs/index.html -+CacheFile /usr/local/apache2/htdocs/index.htmlSi vous désirez mettre en cache un grand nombre de fichiers @@ -738,8 +734,7 @@ CacheDirLength 1 temps nécessaire à la première lecture d'un fichier et le temps nécessaire à sa deuxième lecture;
-@@ -156,13 +142,11 @@ ret=ap_run_do_something(r, n);-colm@coroebus:~$ time cat testfile > /dev/null +utilisera le contenu chargé en mémoire pour satisfaire ultérieurement toutes les demandes d'accès à ce fichier. -colm@coroebus:~$ time cat testfile > /dev/null real 0m0.065s user 0m0.000s sys 0m0.001s @@ -783,9 +778,7 @@ sys 0m0.000s- MMapFile /usr/local/apache2/htdocs/index.html -+MMapFile /usr/local/apache2/htdocs/index.htmlComme dans le cas de la directive diff --git a/docs/manual/content-negotiation.html.en b/docs/manual/content-negotiation.html.en index 9cc497d5c2..a1b9449a0b 100644 --- a/docs/manual/content-negotiation.html.en +++ b/docs/manual/content-negotiation.html.en @@ -518,10 +518,8 @@ Negotiation try to select a matching variant. If there's no such variant, the normal negotiation process applies.
-diff --git a/docs/manual/content-negotiation.html.fr b/docs/manual/content-negotiation.html.fr index 6d4e29145e..fcd90a7182 100644 --- a/docs/manual/content-negotiation.html.fr +++ b/docs/manual/content-negotiation.html.fr @@ -541,10 +541,8 @@ langage de sélectionner une variante correspondante. S'il n'existe pas de telle variante, le processus normal de négociation sera lancé. -Example
-SetEnvIf Cookie "language=(.+)" prefer-language=$1 -Header append Vary cookie -+Example
SetEnvIf Cookie "language=(.+)" prefer-language=$1 +Header append Vary cookiediff --git a/docs/manual/custom-error.html.en b/docs/manual/custom-error.html.en index 12afe65fda..c4efb99c28 100644 --- a/docs/manual/custom-error.html.en +++ b/docs/manual/custom-error.html.en @@ -64,20 +64,16 @@ ifExemple
-SetEnvIf Cookie "language=(.+)" prefer-language=$1 -Header append Vary cookie -+Exemple
SetEnvIf Cookie "language=(.+)" prefer-language=$1 +Header append Vary cookieAllowOverrideis set to FileInfo. --ErrorDocument 500 "Sorry, our script crashed. Oh dear"
+ErrorDocument 500 "Sorry, our script crashed. Oh dear"+ErrorDocument 401 /subscription/how_to_subscribe.html
ErrorDocument 500 /cgi-bin/crash-recover
ErrorDocument 500 http://error.example.com/server_error.html
ErrorDocument 404 /errors/not_found.html
-ErrorDocument 401 /subscription/how_to_subscribe.html -The syntax of the
-ErrorDocumentdirective is:- ErrorDocument <3-digit-code> <action> -+ErrorDocument <3-digit-code> <action>where the action will be treated as:
@@ -156,12 +152,10 @@ ErrorDocument 401 /subscription/how_to_subscribe.html caused it to be invoked. For instance, a Perl ErrorDocument script might include the following: --... +... print "Content-type: text/html\n";+...
printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
-... -If the script is dedicated to handling a particular error @@ -186,10 +180,8 @@ printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
In your server configuration file, you'll see a line such as:
-- # Multi-language error messages+
- #Include conf/extra/httpd-multilang-errordoc.conf -# Multi-language error messages
+ #Include conf/extra/httpd-multilang-errordoc.confUncommenting this
-Includeline will enable this diff --git a/docs/manual/custom-error.html.fr b/docs/manual/custom-error.html.fr index 3355275d2b..18b815fcfb 100644 --- a/docs/manual/custom-error.html.fr +++ b/docs/manual/custom-error.html.fr @@ -67,20 +67,16 @@ .htaccess siAllowOverrideest définie à FileInfo.-ErrorDocument 500 "Désolé, notre script s'est +ErrorDocument 500 "Désolé, notre script s'est crashé ; comme c'est dommage !"+ErrorDocument 401 /subscription/how_to_subscribe.html
ErrorDocument 500 /cgi-bin/crash-recover
ErrorDocument 500 http://error.example.com/server_error.html
ErrorDocument 404 /errors/not_found.html
-ErrorDocument 401 /subscription/how_to_subscribe.html -La syntaxe de la directive
-ErrorDocumentest :- ErrorDocument <code_3_chiffres> <action> -+ErrorDocument <code_3_chiffres> <action>où action peut être traitée comme :
@@ -166,12 +162,10 @@ ErrorDocument 401 /subscription/how_to_subscribe.html par une directive ErrorDocument pourrait contenir ce qui suit : -
-... +... print "Content-type: text/html\n";+...
printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
-... -Si un script est dédié à la gestion d'une condition d'erreur @@ -198,10 +192,8 @@ printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
Dans le fichier de configuration de votre serveur, vous trouverez un groupe de lignes du style :
-- # Multi-language error messages+
- #Include conf/extra/httpd-multilang-errordoc.conf -# Multi-language error messages
+ #Include conf/extra/httpd-multilang-errordoc.confDécommentez la ligne
Includepour activer cette diff --git a/docs/manual/developer/API.html.en b/docs/manual/developer/API.html.en index 8d4091a8d2..03940fc35f 100644 --- a/docs/manual/developer/API.html.en +++ b/docs/manual/developer/API.html.en @@ -358,9 +358,7 @@ struct stat finfo; /* Set by server core;int header_only; /* HEAD request, as opposed to GET */ char *protocol; /* Protocol, as given to us, or HTTP/0.9 */ char *method; /* GET, HEAD, POST, etc. */ -int method_number; /* M_GET, M_POST, etc. */ - -
+int method_number; /* M_GET, M_POST, etc. */-
/* Info for logging */
char *the_request;
diff --git a/docs/manual/developer/filters.html.en b/docs/manual/developer/filters.html.en index 86fcae5804..c5512962ba 100644 --- a/docs/manual/developer/filters.html.en +++ b/docs/manual/developer/filters.html.en @@ -133,19 +133,15 @@ same set of filters as the main request. A graphical representation might help:+-Default_handler --> includes_filter --> byterange --> ... -Default_handler --> includes_filter --> byterange --> ...If the includes filter creates a sub request, then we don't want the data from that sub-request to go through the includes filter, because it might not be SSI data. So, the subrequest adds the following:
--Default_handler --> includes_filter -/-> byterange --> ... ++Default_handler --> sub_request_coreDefault_handler --> includes_filter -/-> byterange --> ... / -Default_handler --> sub_request_core -What happens if the subrequest is SSI data? Well, that's easy, the
-includes_filteris a resource filter, so it will be added to diff --git a/docs/manual/developer/hooks.html.en b/docs/manual/developer/hooks.html.en index 100a8aa7ad..6e78a73194 100644 --- a/docs/manual/developer/hooks.html.en +++ b/docs/manual/developer/hooks.html.en @@ -49,9 +49,7 @@ arguments. For example, if the hook returns anintand takes arequest_rec *and anintand is calleddo_something, then declare it like this:- AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n)) -+AP_DECLARE_HOOK(int, do_something, (request_rec *r, int n))This should go in a header which modules will include if @@ -63,12 +61,10 @@ which is used to record the module functions that use the hook. This is declared as follows:
--APR_HOOK_STRUCT( +@@ -82,9 +78,7 @@ APR_HOOK_STRUCT(APR_HOOK_STRUCT( APR_HOOK_LINK(do_something) ... -) -+)If the return value of a hook is
-void, then all the hooks are called, and the caller is implemented like this:- AP_IMPLEMENT_HOOK_VOID(do_something, (request_rec *r, int n), (r, n)) -+AP_IMPLEMENT_HOOK_VOID(do_something, (request_rec *r, int n), (r, n))The second and third arguments are the dummy argument @@ -92,13 +86,11 @@ APR_HOOK_STRUCT( calling the hook. In other words, this macro expands to something like this:
--void ap_run_do_something(request_rec *r, int n) +@@ -106,9 +98,7 @@ void ap_run_do_something(request_rec *r, int n)void ap_run_do_something(request_rec *r, int n) { ... do_something(r, n); -} -+}If the hook returns a value, then it can either be run until the first hook that does something interesting, like so:
-- AP_IMPLEMENT_HOOK_RUN_FIRST(int, do_something, (request_rec *r, int n), (r, n), DECLINED) -+AP_IMPLEMENT_HOOK_RUN_FIRST(int, do_something, (request_rec *r, int n), (r, n), DECLINED)The first hook that does not return
-DECLINED@@ -124,9 +114,7 @@ void ap_run_do_something(request_rec *r, int n) value other than one of those two stops the loop, and its return is the return value. Declare these like so:- AP_IMPLEMENT_HOOK_RUN_ALL(int, do_something, (request_rec *r, int n), (r, n), OK, DECLINED) -+AP_IMPLEMENT_HOOK_RUN_ALL(int, do_something, (request_rec *r, int n), (r, n), OK, DECLINED)Again,
OKandDECLINEDare the traditional @@ -138,12 +126,10 @@ void ap_run_do_something(request_rec *r, int n)At appropriate moments in the code, call the hook caller, like so:
--int n, ret; +int n, ret; request_rec *r; -ret=ap_run_do_something(r, n); -+ret=ap_run_do_something(r, n);Include the appropriate header, and define a static function of the correct type:
--static int my_something_doer(request_rec *r, int n)@@ -171,8 +155,7 @@ static int my_something_doer(request_rec *r, int n)
+static int my_something_doer(request_rec *r, int n)+}
{ ... return OK; -} -
registering function, which is included in the module structure: --static void my_register_hooks() +@@ -215,14 +197,12 @@ mode MODULE_VAR_EXPORT my_module = example, suppose we want "mod_xyz.c" and "mod_abc.c" to run before we do, then we'd hook as follows: -static void my_register_hooks() { ap_hook_do_something(my_something_doer, NULL, NULL, APR_HOOK_MIDDLE); } @@ -181,8 +164,7 @@ mode MODULE_VAR_EXPORT my_module = { ... my_register_hooks /* register hooks */ -}; -+};-static void register_hooks() +static void register_hooks() { static const char * const aszPre[] = { "mod_xyz.c", "mod_abc.c", NULL }; ap_hook_do_something(my_something_doer, aszPre, NULL, APR_HOOK_MIDDLE); -} -+}Note that the sort used to achieve this is stable, so diff --git a/docs/manual/developer/lua.html.en b/docs/manual/developer/lua.html.en index 47fc59fe63..c5085d9496 100644 --- a/docs/manual/developer/lua.html.en +++ b/docs/manual/developer/lua.html.en @@ -88,11 +88,9 @@ a hook function will then acquire a state from the pool and release it back when done using it, allowing you to still gain a significant performance increase, while keeping your memory footprint low. Some examples of possible settings are:
--LuaScope once +LuaScope once LuaScope thread -LuaScope server 5 40 -+LuaScope server 5 40As a general rule of thumb: If your server has none to low usage, use
-once@@ -127,8 +125,7 @@ may be negligible, as files httpd will stat the files regardless. For maximum performance, it is generally recommended that any initialization of libraries, constants and master tables be kept outside the handle's scope:---[[ This is good practice ]]-- +---[[ This is good practice ]]-- require "string" require "someLibrary" local masterTable = {} @@ -136,11 +133,9 @@ local constant = "Foo bar baz" function handle(r) do_stuff() -end -+end---[[ This is bad practice ]]-- +@@ -164,15 +158,12 @@ end decisions than would otherwise be allowed with said directives. ---[[ This is bad practice ]]-- require "string" function handle(r) @@ -148,8 +143,7 @@ function handle(r) local masterTable = {} local constant = "Foo bar baz" do_stuff() -end -+end-LuaHookTranslateName /path/too/foo.lua remap -+LuaHookTranslateName /path/too/foo.lua remap----[[ +---[[ Simple remap example. This example will rewrite /foo/test.bar to the physical file /internal/test, somewhat like how mod_alias works. @@ -185,15 +176,13 @@ function remap(r) r.filename = "/internal/" .. barFile end return apache2.OK -end -+end---[[ +@@ -259,15 +247,12 @@ bla bla document roots of each hostname. ---[[ Advanced remap example. This example will evaluate some conditions, and based on that, remap a file to one of two destinations, using a rewrite map. @@ -239,8 +228,7 @@ function remap(r) end end return apache2.DECLINED -end -+end-LuaHookTranslateName /path/too/foo.lua mass_vhost -+LuaHookTranslateName /path/too/foo.lua mass_vhost----[[ +---[[ Simple mass vhost script This example will check a map for a virtual host and rewrite filename and document root accordingly. @@ -292,15 +277,13 @@ function mass_vhost(r) end end return apache2.DECLINED -end -+end---[[ +@@ -358,14 +340,11 @@ end processing, allowing you to either add new requirements that were not previously supported by httpd, or tweaking existing ones to accommodate your needs. ---[[ Advanced mass virtual hosting This example will query a database for vhost entries and save them for 60 seconds before checking for updates. For best performance, such scripts @@ -342,8 +325,7 @@ function mass_vhost(r) return apache2.OK end return apache2.DECLINED -end -+end-LuaHookAuthChecker /path/too/foo.lua check_auth -+LuaHookAuthChecker /path/too/foo.lua check_auth----[[ +---[[ A simple authentication hook that checks a table containing usernames and passwords of two accounts. ]]-- @@ -400,15 +379,13 @@ function check_auth(r) else return apache2.OK end -end -+end---[[ +@@ -479,19 +455,16 @@ end example below shows you how you can split a single htpasswd file into groups with different permissions: ---[[ An advanced authentication checker with a database backend, caching account entries for 1 minute ]]-- @@ -464,8 +441,7 @@ function check_auth(r) else return apache2.OK end -end -+end-LuaAuthzProvider rights /path/to/lua/script.lua rights_handler +-LuaAuthzProvider rights /path/to/lua/script.lua rights_handler <Directory /www/private> Require rights member </Directory> <Directory /www/admin> Require rights admin -</Directory> -+</Directory>---[[ +--[[ This script has two user groups; members and admins, and whichever is refered to by the "Require rights" directive is checked to see if the authenticated user belongs to this group. @@ -518,8 +491,7 @@ function rights_handler(r, what) end end return apache2.AUTHZ_DENIED -end -+end
-LuaHookTranslateName /path/to/script.lua proxy_handler -+
LuaHookTranslateName /path/to/script.lua proxy_handler-
---[[
+--[[
This script uses a basic IVM table to determine where to
send the request.
]]--
@@ -573,8 +542,7 @@ function proxy_handler(r)
r.proxyreq = apache2.PROXYREQ_REVERSE
r.filename = "proxy:" .. backends[backend] .. r.uri
return apache2.DECLINED -- let the proxy handler do this instead
-end
-
+end
Coming soon!
--LuaMapHandler ^/portal/([a-z]+)/ /path/to/lua/script.lua handle_$1 -+
LuaMapHandler ^/portal/([a-z]+)/ /path/to/lua/script.lua handle_$1
-apxs -i -a -c mod_example.c -
apxs -i -a -c mod_example.c
-module AP_MODULE_DECLARE_DATA example_module =
+module AP_MODULE_DECLARE_DATA example_module =
{
STANDARD20_MODULE_STUFF,
create_dir_conf, /* Per-directory configuration handler */
@@ -107,8 +104,7 @@ module AP_MODULE_DECLARE_DATA example_module =
merge_svr_conf, /* Merge handler for per-server configurations */
directives, /* Any directives we may have for httpd */
register_hooks /* Our hook registering function */
-};
-
+};
@@ -125,9 +121,7 @@ of the module is used primarily for two things:-LoadModule example_module modules/mod_example.so -+
LoadModule example_module modules/mod_example.so
In essence, this tells the server to open up mod_example.so and look for a module
@@ -171,9 +165,7 @@ our example case, we want every request ending with .sum to be served by
mod_example, so we'll add a configuration directive that tells
the server to do just that:
-AddHandler example-handler .sum -+
AddHandler example-handler .sum
What this tells the server is the following: Whenever we receive a request @@ -195,8 +187,7 @@ definition will look like this:
-
-module AP_MODULE_DECLARE_DATA example_module =
+module AP_MODULE_DECLARE_DATA example_module =
{
STANDARD20_MODULE_STUFF,
NULL,
@@ -205,8 +196,7 @@ module AP_MODULE_DECLARE_DATA example_module =
NULL,
NULL,
register_hooks /* Our hook registering function */
-};
-
+};
@@ -223,13 +213,11 @@ to hook into its process as one of the last modules:
-
-static void register_hooks(apr_pool_t *pool)
+static void register_hooks(apr_pool_t *pool)
{
/* Create a hook in the request handler, so we get called when a request arrives */
ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
-}
-
+}
@@ -279,8 +267,7 @@ In C code, our example handler will now look like this:
-
-static int example_handler(request_rec *r)
+static int example_handler(request_rec *r)
{
/* First off, we need to check if this is a call for the "example-handler" handler.
* If it is, we accept it and do our things, if not, we simply return DECLINED,
@@ -298,8 +285,7 @@ static int example_handler(request_rec *r)
* We do so by simply returning the value OK to the server.
*/
return OK;
-}
-
+}
@@ -344,8 +330,7 @@ Let's try out some of these variables in another example handler:
-static int example_handler(request_rec *r)
+static int example_handler(request_rec *r)
{
/* Set the appropriate content type */
ap_set_content_type(r, "text/html");
@@ -366,8 +351,7 @@ static int example_handler(request_rec *r)
ap_rprintf(r, "Your query string was: %s", r->args);
}
return OK;
-}
-
+}
@@ -384,13 +368,11 @@ status code, for example:
-
-static int example_handler(request_rec *r)
+static int example_handler(request_rec *r)
{
/* Return 404: Not found */
return HTTP_NOT_FOUND;
-}
-
+}
@@ -500,8 +482,7 @@ apr_pool_t *p, const char *fmt, ...): Similar to sprintf, ex
-
-static int example_handler(request_rec *r)
+static int example_handler(request_rec *r)
{
const char* original = "You can't edit this!";
char* copy;
@@ -513,8 +494,7 @@ static int example_handler(request_rec *r)
/* Create a copy of the 'original' variable that we can edit. */
copy = apr_pstrdup(r->pool, original);
return OK;
-}
-
+}
@@ -527,15 +507,13 @@ function to sort it out:
-
-static void register_hooks(apr_pool_t *pool)
+static void register_hooks(apr_pool_t *pool)
{
/* Call a function that initializes some stuff */
example_init_function(pool);
/* Create a hook in the request handler, so we get called when a request arrives */
ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
-}
-
+}
@@ -575,8 +553,7 @@ POST data is four simple lines:
ap_args_to_table(r, &GET);
-ap_parse_form_data(r, NULL, &POST, -1, 8192);
-
+ap_parse_form_data(r, NULL, &POST, -1, 8192);
@@ -588,13 +565,11 @@ GET. To extract this value, we need only perform a simple operation:
--/* Get the "digest" key from the query string, if any. */ +@@ -614,8 +589,7 @@ out the MD5 or SHA1 digest of files: -/* Get the "digest" key from the query string, if any. */ const char *digestType = apr_table_get(GET, "digest"); /* If no key was returned, we will set a default value instead. */ -if (!digestType) digestType = "sha1"; -+if (!digestType) digestType = "sha1";
-static int example_handler(request_rec *r)
+static int example_handler(request_rec *r)
{
int rc, exists;
apr_finfo_t finfo;
@@ -722,8 +696,7 @@ static int example_handler(request_rec *r)
}
/* Let the server know that we responded to this request. */
return OK;
-}
-
+}
@@ -752,11 +725,9 @@ what a configuration directive is. Simply put, a directive is a way of
telling an individual module (or a set of modules) how to behave, such as
these directives control how mod_rewrite works:
-
-RewriteEngine On
+RewriteEngine On
RewriteCond %{REQUEST_URI} ^/foo/bar
-RewriteRule ^/foo/bar/(.*)$ /foobar?page=$1
-
+RewriteRule ^/foo/bar/(.*)$ /foobar?page=$1
Each of these configuration directives are handled by a separate function, @@ -768,13 +739,11 @@ that parses the parameters given and sets up a configuration accordingly. -
-typedef struct {
+typedef struct {
int enabled; /* Enable or disable our module */
const char *path; /* Some path to...something */
int typeOfAction; /* 1 means action A, 2 means action B and so on */
-} example_config;
-
+} example_config;
@@ -786,8 +755,7 @@ values to their defaults:
-
-typedef struct {
+typedef struct {
int enabled; /* Enable or disable our module */
const char *path; /* Some path to...something */
int typeOfAction; /* 1 means action A, 2 means action B and so on */
@@ -824,8 +792,7 @@ module AP_MODULE_DECLARE_DATA example_module =
NULL, /* Merge handler for per-server configurations */
NULL, /* Any directives we may have for httpd */
register_hooks /* Our hook registering function */
-};
-
+};
@@ -833,11 +800,9 @@ module AP_MODULE_DECLARE_DATA example_module =
So far so good. To access our new handler, we could add the following to
our configuration:
-
-<Location /example>
+<Location /example>
SetHandler example-handler
-</Location>
-
+</Location>
When we visit, we'll see our current configuration being spit out by our @@ -855,8 +820,7 @@ reference to the configuration directives we want to register with the server:
-
-module AP_MODULE_DECLARE_DATA example_module =
+module AP_MODULE_DECLARE_DATA example_module =
{
STANDARD20_MODULE_STUFF,
NULL, /* Per-directory configuration handler */
@@ -865,8 +829,7 @@ module AP_MODULE_DECLARE_DATA example_module =
NULL, /* Merge handler for per-server configurations */
example_directives, /* Any directives we may have for httpd */
register_hooks /* Our hook registering function */
-};
-
+};
@@ -879,15 +842,13 @@ will add a structure with three directives and a NULL at the end:
-
-static const command_rec example_directives[] =
+static const command_rec example_directives[] =
{
AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"),
AP_INIT_TAKE1("examplePath", example_set_path, NULL, RSRC_CONF, "The path to whatever"),
AP_INIT_TAKE2("exampleAction", example_set_action, NULL, RSRC_CONF, "Special action value!"),
{ NULL }
-};
-
+};
@@ -926,8 +887,7 @@ exampleAction directive to accept two arguments, its C function also
has an additional parameter defined:
-
-/* Handler for the "exampleEnabled" 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;
@@ -953,8 +913,7 @@ const char *example_set_action(cmd_parms *cmd, void *cfg, const char *arg1, cons
if(!strcasecmp(arg2, "deny")) config.typeOfAction += 0x10;
else config.typeOfAction += 0x20;
return NULL;
-}
-
+}
@@ -967,8 +926,7 @@ we can assemble our module into one big file:
-
-/* mod_example_config_simple.c: */
+/* mod_example_config_simple.c: */
#include <stdio.h>
#include "apr_hash.h"
#include "ap_config.h"
@@ -1079,8 +1037,7 @@ module AP_MODULE_DECLARE_DATA example_module =
NULL, /* Merge handler for per-server configurations */
example_directives, /* Any directives we may have for httpd */
register_hooks /* Our hook registering function */
-};
-
+};
@@ -1089,11 +1046,9 @@ module AP_MODULE_DECLARE_DATA example_module =
In our httpd.conf file, we can now change the hard-coded configuration by
adding a few lines:
--ExampleEnabled On +ExampleEnabled On ExamplePath "/usr/bin/foo" -ExampleAction file allow -+ExampleAction file allow
And thus we apply the configuration, visit /example on our
@@ -1113,15 +1068,13 @@ different meanings to the user of the server, and thus different contexts
within which modules must operate. For example, let's assume you have this
configuration set up for mod_rewrite:
-<Directory "/var/www">
+<Directory "/var/www">
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule (.*) http://www.example.com/$1
</Directory>
<Directory "/var/www/sub">
RewriteRule ^foobar$ index.php?foobar=true
-</Directory>
-
+</Directory>
In this example, you will have set up two different contexts for @@ -1144,9 +1097,7 @@ directory or location in question? It does so by making one simple call:
--example_config *config = (example_config*) ap_get_module_config(r->per_dir_config, &example_module); -+
example_config *config = (example_config*) ap_get_module_config(r->per_dir_config, &example_module);@@ -1165,14 +1116,12 @@ variable that we can use to track which context configuration is being used by the server in various places: -
-typedef struct {
+typedef struct {
char context[256];
char path[256];
int typeOfAction;
int enabled;
-} example_config;
-
+} example_config;
@@ -1180,8 +1129,7 @@ typedef struct {
-
-static int example_handler(request_rec *r)
+static int example_handler(request_rec *r)
{
if(!r->handler || strcmp(r->handler, "example-handler")) return(DECLINED);
example_config *config = (example_config*) ap_get_module_config(r->per_dir_config, &example_module);
@@ -1191,8 +1139,7 @@ static int example_handler(request_rec *r)
ap_rprintf("TypeOfAction: %x\n", config->typeOfAction);
ap_rprintf("Context: %s\n", config->context);
return OK;
-}
-
+}
@@ -1206,9 +1153,7 @@ a directive required five elements be set:
-
-AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"),
-
+AP_INIT_TAKE1("exampleEnabled", example_set_enabled, NULL, RSRC_CONF, "Enable or disable mod_example"),
@@ -1241,8 +1186,7 @@ and managing our configurations. Since we have chosen the per-directory
per-directory creator and merger function reference in our tag:
-
-module AP_MODULE_DECLARE_DATA example_module =
+module AP_MODULE_DECLARE_DATA example_module =
{
STANDARD20_MODULE_STUFF,
create_dir_conf, /* Per-directory configuration handler */
@@ -1251,8 +1195,7 @@ module AP_MODULE_DECLARE_DATA example_module =
NULL, /* Merge handler for per-server configurations */
directives, /* Any directives we may have for httpd */
register_hooks /* Our hook registering function */
-};
-
+};
@@ -1267,8 +1210,7 @@ our first step is to make a function for creating new, blank
configurations. We do so by creating the function we just referenced in
our name tag as the Per-directory configuration handler:
-
-void* example_create_dir_conf(apr_pool_t* pool, char* context) {
+void* example_create_dir_conf(apr_pool_t* pool, char* context) {
context = context ? context : "(undefined context)";
example_config *cfg = apr_pcalloc(pool, sizeof(example_config));
if(cfg) {
@@ -1279,8 +1221,7 @@ void* example_create_dir_conf(apr_pool_t* pool, char* context) {
cfg->typeOfAction = 0x11;
}
return cfg;
-}
-
+}
@@ -1293,16 +1234,14 @@ Our next step in creating a context aware configuration is merging
configurations. This part of the process particularly applies to scenarios
where you have a parent configuration and a child, such as the following:
-
-<Directory "/var/www">
+<Directory "/var/www">
ExampleEnabled On
ExamplePath /foo/bar
ExampleAction file allow
</Directory>
<Directory "/var/www/subdir">
ExampleAction file deny
-</Directory>
-
+</Directory>
In this example, it is natural to assume that the directory
@@ -1325,8 +1264,7 @@ two configurations and decide how they are to be merged:
-void* merge_dir_conf(apr_pool_t* pool, void* BASE, void* ADD) {
+void* merge_dir_conf(apr_pool_t* pool, void* BASE, void* ADD) {
example_config* base = (example_config *) BASE ; /* This is what was set in the parent context */
example_config* add = (example_config *) ADD ; /* This is what is set in the new context */
example_config* conf = (example_config *) create_dir_conf(pool, "Merged configuration"); /* This will be the merged configuration */
@@ -1337,8 +1275,7 @@ void* merge_dir_conf(apr_pool_t* pool, void* BASE, void* ADD) {
strcpy(conf->path, strlen(add->path) ? add->path : base->path);
return conf ;
-}
-
+}
@@ -1351,8 +1288,7 @@ Now, let's try putting it all together to create a new module that is
context aware. First off, we'll create a configuration that lets us test
how the module works:
-
-<Location "/a">
+<Location "/a">
SetHandler example-handler
ExampleEnabled on
ExamplePath "/foo/bar"
@@ -1368,8 +1304,7 @@ how the module works:
ExampleAction db deny
ExamplePath "/foo/bar/baz"
ExampleEnabled on
-</Location>
-
+</Location>
Then we'll assemble our module code. Note, that since we are now using our @@ -1378,8 +1313,7 @@ added some prototypes to keep the compiler happy:
-
-/*$6
+/*$6
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* mod_example_config.c
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -1602,8 +1536,7 @@ void *merge_dir_conf(apr_pool_t *pool, void *BASE, void *ADD)
conf->typeOfAction = add->typeOfAction ? add->typeOfAction : base->typeOfAction;
strcpy(conf->path, strlen(add->path) ? add->path : base->path);
return conf;
-}
-
+}
@@ -1630,8 +1563,7 @@ or check out the rest of our documentation for further tips.
-
-typedef struct {
+typedef struct {
const char* key;
const char* value;
} keyValuePair;
@@ -1684,8 +1616,7 @@ static int example_handler(request_rec *r)
}
}
return OK;
-}
-
+}
@@ -1696,8 +1627,7 @@ static int example_handler(request_rec *r)
-
-static int example_handler(request_rec *r)
+static int example_handler(request_rec *r)
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
const apr_array_header_t *fields;
@@ -1711,8 +1641,7 @@ static int example_handler(request_rec *r)
ap_rprintf(r, "%s: %s\n", e[i].key, e[i].val);
}
return OK;
-}
-
+}
@@ -1723,8 +1652,7 @@ static int example_handler(request_rec *r)
-
-static int util_read(request_rec *r, const char **rbuf, apr_off_t *size)
+static int util_read(request_rec *r, const char **rbuf, apr_off_t *size)
{
/*~~~~~~~~*/
int rc = OK;
@@ -1770,8 +1698,7 @@ static int example_handler(request_rec* r)
ap_rprintf(r, "We read a request body that was %" APR_OFF_T_FMT " bytes long", size);
}
return OK;
-}
-
+}
diff --git a/docs/manual/developer/modules.html.en b/docs/manual/developer/modules.html.en
index 66759f78c3..9c9d32833f 100644
--- a/docs/manual/developer/modules.html.en
+++ b/docs/manual/developer/modules.html.en
@@ -86,8 +86,7 @@
will be called in.
This is the code that was added to mod_mmap_static:
-static void register_hooks(void) +static void register_hooks(void) { static const char * const aszPre[]={ "http_core.c",NULL }; ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE); @@ -131,8 +130,7 @@ static void register_hooks(void) creating your module definition. The old definition looked like -@@ -502,9 +486,7 @@ contenant l'index le nom du fichier qui sera inséré au début de la page contenant l'index. nom fichier est le nom du fichier à inclure. --module MODULE_VAR_EXPORT module_name_module = +module MODULE_VAR_EXPORT module_name_module = { STANDARD_MODULE_STUFF, /* initializer */ @@ -156,8 +154,7 @@ module MODULE_VAR_EXPORT module_name_module = };The new structure is a great deal simpler...
-@@ -481,9 +467,7 @@ n'est pr chemin URL est une URL relative (échappée par des caractères '%') vers l'icône ou une URL pleinement qualifiée. --module MODULE_VAR_EXPORT module_name_module = +@@ -458,9 +446,7 @@ type MIMEmodule MODULE_VAR_EXPORT module_name_module = { STANDARD20_MODULE_STUFF, /* create per-directory config structures */ diff --git a/docs/manual/developer/modules.html.ja.utf8 b/docs/manual/developer/modules.html.ja.utf8 index 24fa63026f..125e6d2bc5 100644 --- a/docs/manual/developer/modules.html.ja.utf8 +++ b/docs/manual/developer/modules.html.ja.utf8 @@ -95,8 +95,7 @@以下ã¯ã€
-mod_mmap_staticã«è¿½åŠ ã—ãŸã‚³ãƒ¼ãƒ‰ã§ã™:@@ -313,10 +307,8 @@ fichier en fonction de son type MIME texte doit être entouré de guillemets (-static void register_hooks(void) +@@ -475,9 +459,7 @@ of the index listing of the file that will be inserted at the top of the index listing. Filename is the name of the file to include. -static void register_hooks(void) { static const char * const aszPre[]={ "http_core.c",NULL }; ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE); @@ -139,8 +138,7 @@ static void register_hooks(void)モジュールã®å®šç¾©ã‚’作æˆã™ã‚‹éš›ã«æ³¨æ„ã—ãªã‘れã°ãªã‚‰ãªã„ ã‚¹ãƒ†ãƒ¼ã‚¸ã®æ•°ã¯æ¿€æ¸›ã—ã¦ã„ã¾ã™ã€‚å¤ã„å®šç¾©ã¯æ¬¡ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã—ãŸã€‚
-@@ -454,9 +440,7 @@ configured Url-path is a (%-escaped) relative URL to the icon, or a fully qualified remote URL. --module MODULE_VAR_EXPORT module_name_module = +module MODULE_VAR_EXPORT module_name_module = { STANDARD_MODULE_STUFF, /* initializer */ @@ -164,8 +162,7 @@ module MODULE_VAR_EXPORT module_name_module = };æ–°ã—ã„æ§‹é€ 体ã¯ã¨ã£ã¦ã‚‚シンプルã§ã™â€¦
-@@ -432,9 +420,7 @@ content-type-module MODULE_VAR_EXPORT module_name_module = +@@ -300,10 +294,8 @@ icon selected by MIME content-type expression or full filename for files to describe. String is enclosed in double quotes (module MODULE_VAR_EXPORT module_name_module = { STANDARD20_MODULE_STUFF, /* create per-directory config structures */ diff --git a/docs/manual/developer/output-filters.html.en b/docs/manual/developer/output-filters.html.en index 46c11ffec2..d85420c20d 100644 --- a/docs/manual/developer/output-filters.html.en +++ b/docs/manual/developer/output-filters.html.en @@ -129,14 +129,12 @@ brigade should have no side effects (such as changing any state private to the filter). -@@ -254,8 +252,7 @@How to handle an empty brigade
- apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)
+How to handle an empty brigade
apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb)+ ....
{ if (APR_BRIGADE_EMPTY(bb)) { return APR_SUCCESS; } - .... -Taking an example which loops through the entire brigade as follows:
-Bad output filter -- do not imitate!
-apr_bucket *e = APR_BRIGADE_FIRST(bb); +Bad output filter -- do not imitate!
apr_bucket *e = APR_BRIGADE_FIRST(bb); const char *data; apr_size_t len; @@ -265,8 +262,7 @@ while (e != APR_BRIGADE_SENTINEL(bb)) { } -return ap_pass_brigade(bb); -+return ap_pass_brigade(bb);The above implementation would consume memory proportional to @@ -279,8 +275,7 @@ return ap_pass_brigade(bb); amount of memory to filter any brigade; a temporary brigade is needed and must be allocated only once per response, see the Maintaining state section.
-@@ -311,8 +305,7 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { temporary brigade in such a structure, to avoid having to allocate a new brigade per invocation as described in the Brigade structure section. -Better output filter
-apr_bucket *e; +Better output filter
apr_bucket *e; const char *data; apr_size_t len; @@ -295,8 +290,7 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { rv = ap_pass_brigade(f->next, tmpbb); if (rv) ...; apr_brigade_cleanup(tmpbb); -} -+}@@ -410,8 +402,7 @@ apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) script; reading from such a bucket will block when waiting for the CGI script to produce more output. -Example code to maintain filter state
-struct dummy_state { +Example code to maintain filter state
struct dummy_state { apr_bucket_brigade *tmpbb; int filter_state; .... @@ -334,8 +327,7 @@ apr_status_t dummy_filter(ap_filter_t *f, apr_bucket_brigade *bb) state->filter_state = ...; } - ... -+ ...diff --git a/docs/manual/developer/request.html.en b/docs/manual/developer/request.html.en index f5cf2166f6..18e6e9a496 100644 --- a/docs/manual/developer/request.html.en +++ b/docs/manual/developer/request.html.en @@ -150,8 +150,7 @@Example code using non-blocking bucket reads
-apr_bucket *e; +Example code using non-blocking bucket reads
apr_bucket *e; apr_read_type_e mode = APR_NONBLOCK_READ; while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { @@ -436,8 +427,7 @@ while ((e = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) { /* Next time, try a non-blocking read first. */ mode = APR_NONBLOCK_READ; ... -} -+}The Security Phase
Needs Documentation. Code is:
--if ((access_status = ap_run_access_checker(r)) != 0) { +if ((access_status = ap_run_access_checker(r)) != 0) { return decl_die(access_status, "check access", r); } @@ -161,8 +160,7 @@ if ((access_status = ap_run_check_user_id(r)) != 0) { if ((access_status = ap_run_auth_checker(r)) != 0) { return decl_die(access_status, "check authorization", r); -} -+}diff --git a/docs/manual/dns-caveats.html.en b/docs/manual/dns-caveats.html.en index 35816bd156..712f453d53 100644 --- a/docs/manual/dns-caveats.html.en +++ b/docs/manual/dns-caveats.html.en @@ -46,13 +46,11 @@A Simple Example
--# This is a misconfiguration example, do not use on your server +# This is a misconfiguration example, do not use on your server <VirtualHost www.example.dom> ServerAdmin webgirl@example.dom DocumentRoot /www/example -</VirtualHost> -+</VirtualHost>In order for the server to function properly, it absolutely needs @@ -69,13 +67,11 @@
Suppose that
-www.example.domhas address 192.0.2.1. Then consider this configuration snippet:-# This is a misconfiguration example, do not use on your server +# This is a misconfiguration example, do not use on your server <VirtualHost 192.0.2.1> ServerAdmin webgirl@example.dom DocumentRoot /www/example -</VirtualHost> -+</VirtualHost>This time httpd needs to use reverse DNS to find the @@ -89,13 +85,11 @@
Here is a snippet that avoids both of these problems:
--<VirtualHost 192.0.2.1> +<VirtualHost 192.0.2.1> ServerName www.example.dom ServerAdmin webgirl@example.dom DocumentRoot /www/example -</VirtualHost> -+</VirtualHost>@@ -104,16 +98,14 @@Consider this configuration snippet:
--<VirtualHost www.example1.dom> +<VirtualHost www.example1.dom> ServerAdmin webgirl@example1.dom DocumentRoot /www/example1 </VirtualHost> <VirtualHost www.example2.dom> ServerAdmin webguy@example2.dom DocumentRoot /www/example2 -</VirtualHost> -+</VirtualHost>Suppose that you've assigned 192.0.2.1 to diff --git a/docs/manual/dns-caveats.html.fr b/docs/manual/dns-caveats.html.fr index 10e9c83f69..55ce065395 100644 --- a/docs/manual/dns-caveats.html.fr +++ b/docs/manual/dns-caveats.html.fr @@ -48,14 +48,12 @@
Un exemple simple
--# Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base +# Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base # de configuration <VirtualHost www.example.dom> ServerAdmin webgirl@example.dom DocumentRoot /www/example -</VirtualHost> -+</VirtualHost>Pour fonctionner correctement, le serveur a absolument besoin de deux @@ -73,14 +71,12 @@
Supposons que l'adresse de
-www.example.domsoit 192.0.2.1, et examinons cet extrait de configuration :-# Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base +# Ceci est un exemple de mauvaise configuration ; ne l'utilisez pas comme base # de configuration <VirtualHost 192.0.2.1> ServerAdmin webgirl@example.dom DocumentRoot /www/example -</VirtualHost> -+</VirtualHost>Cette fois, httpd doit effectuer une recherche DNS inverse pour @@ -96,13 +92,11 @@
Voici un extrait de configuration qui permet d'éviter ces deux types de problèmes :
--<VirtualHost 192.0.2.1> +<VirtualHost 192.0.2.1> ServerName www.example.dom ServerAdmin webgirl@example.dom DocumentRoot /www/example -</VirtualHost> -+</VirtualHost>@@ -111,16 +105,14 @@@@ -278,9 +274,7 @@ icon selected by MIME content-type This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon. -Considérons cet extrait de configuration :
--<VirtualHost www.example1.dom> +<VirtualHost www.example1.dom> ServerAdmin webgirl@example1.dom DocumentRoot /www/example1 </VirtualHost> <VirtualHost www.example2.dom> ServerAdmin webguy@example2.dom DocumentRoot /www/example2 -</VirtualHost> -+</VirtualHost>Supposons que vous ayez assigné 192.0.2.1 à diff --git a/docs/manual/env.html.en b/docs/manual/env.html.en index de7010e849..e5bb245e9d 100644 --- a/docs/manual/env.html.en +++ b/docs/manual/env.html.en @@ -418,14 +418,12 @@ and
-mod_headersallows you to still accept these headers:-# +@@ -437,8 +435,7 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin httpd.conf to deal with known client problems. Since the affected clients are no longer seen in the wild, this configuration is likely no-longer necessary. -# # The following works around a client sending a broken Accept_Encoding # header. # SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1 -RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding -+RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding-# +@@ -469,12 +465,10 @@ BrowserMatch "JDK/1\.0" force-response-1.0 particular directories, or to prevent logging of requests coming from particular hosts. -# # The following directives modify normal HTTP response behavior. # The first directive disables keepalive for Netscape 2.x and browsers that # spoof it. There are known problems with these browser implementations. @@ -456,8 +453,7 @@ BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 # BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 -BrowserMatch "JDK/1\.0" force-response-1.0 -+BrowserMatch "JDK/1\.0" force-response-1.0-SetEnvIf Request_URI \.gif image-request +@@ -487,14 +481,12 @@ CustomLog logs/access_log common env=!image-request in limited circumstances. We assume that all your images are in a directory calledSetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request -CustomLog logs/access_log common env=!image-request -+CustomLog logs/access_log common env=!image-request/web/images. --SetEnvIf Referer "^http://www\.example\.com/" local_referal +SetEnvIf Referer "^http://www\.example\.com/" local_referal # Allow browsers that do not send Referer info SetEnvIf Referer "^$" local_referal <Directory /web/images> Require env local_referal -</Directory> -+</Directory>For more information about this technique, see the diff --git a/docs/manual/env.html.fr b/docs/manual/env.html.fr index 3867a55f78..6b307ca069 100644 --- a/docs/manual/env.html.fr +++ b/docs/manual/env.html.fr @@ -449,13 +449,11 @@
-mod_setenvifetmod_header, et permettant de prendre en compte ces en-têtes :-# L'exemple suivant montre comment prendre en compte un en-tête@@ -468,8 +466,7 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin httpd.conf pour tenir compte de problèmes connus avec certains clients. Comme les clients concernés sont maintenant très peu utilisés, cet ajout n'est pratiquement plus nécessaire. -
+# L'exemple suivant montre comment prendre en compte un en-tête+RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding
# Accept_Encoding non conforme envoyé par un client. # SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1 -RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding --# +@@ -500,12 +496,10 @@ BrowserMatch "JDK/1\.0" force-response-1.0 dans le fichier de trace des accès. Il peut être facilement adapté pour empêcher le traçage de répertoires particuliers, ou de requêtes en provenance de certains hôtes. -# # The following directives modify normal HTTP response behavior. # The first directive disables keepalive for Netscape 2.x and browsers that # spoof it. There are known problems with these browser implementations. @@ -487,8 +484,7 @@ BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 # BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 -BrowserMatch "JDK/1\.0" force-response-1.0 -+BrowserMatch "JDK/1\.0" force-response-1.0-SetEnvIf Request_URI \.gif image-request +@@ -518,14 +512,12 @@ CustomLog logs/access_log common env=!image-request recommandée, mais elle peut fonctionner dans des circonstances bien définies. Nous supposons que toutes vos images sont enregistrées dans un répertoire nomméSetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request -CustomLog logs/access_log common env=!image-request -+CustomLog logs/access_log common env=!image-request/web/images. --SetEnvIf Referer "^http://www\.example\.com/" local_referal +SetEnvIf Referer "^http://www\.example\.com/" local_referal # Autorise les navigateurs qui n'envoient aucune information de Referer SetEnvIf Referer "^$" local_referal <Directory /web/images> Require env local_referal -</Directory> -+</Directory>Pour plus d'informations sur cette technique, voir le tutoriel sur diff --git a/docs/manual/env.html.ja.utf8 b/docs/manual/env.html.ja.utf8 index e395517352..8d50c64bc0 100644 --- a/docs/manual/env.html.ja.utf8 +++ b/docs/manual/env.html.ja.utf8 @@ -365,8 +365,7 @@ httpd.conf ã«æ¬¡ã®è¡Œã‚’åŠ ãˆã‚‹ã‚ˆã†æŽ¨å¥¨ã•れã¦ã„ã¾ã—ãŸãŒã€ 今ã¨ãªã£ã¦ã¯ã€å•題ã¨ã—ã¦ã„ãŸã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã¯å®Ÿéš›ã«ã¯è¦‹ã‹ã‘ã‚‹ã“ã¨ã¯ ãªããªã£ã¦ããŸã®ã§ã€ã“ã®è¨å®šã¯ã‚‚ã¯ã‚„å¿…è¦ãªã„ã‹ã‚‚ã—れã¾ã›ã‚“。
-@@ -252,9 +250,7 @@ selected by MIME-encoding This alternate text is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon. --# +ã“れを変更ã™ã‚‹ã“ã¨ã§ã€ç‰¹å®šã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ãƒã‚°åŽé›†ã‚’ã‚„ã‚ãŸã‚Šã€ 特定ã®ãƒ›ã‚¹ãƒˆã‹ã‚‰ã®ãƒªã‚¯ã‚¨ã‚¹ãƒˆã®ãƒã‚°åŽé›†ã‚’ã‚„ã‚ãŸã‚Šã™ã‚‹ã“ã¨ãŒç°¡å˜ã«ã§ãã¾ã™ã€‚ -# # The following directives modify normal HTTP response behavior. # The first directive disables keepalive for Netscape 2.x and browsers that # spoof it. There are known problems with these browser implementations. @@ -394,8 +393,7 @@ BrowserMatch "JDK/1\.0" force-response-1.0ã“ã‚Œã¯æŽ¨å¥¨ã•れã¦ã„ã‚‹è¨å®šã§ã¯ã‚りã¾ã›ã‚“ãŒã€ã‚ã‚‹é™å®šã•れãŸçжæ³ã§ã¯æœ‰åйã§ã™ã€‚ ã“ã“ã§ã¯ã€ã™ã¹ã¦ã®ç”»åƒã¯-SetEnvIf Request_URI \.gif image-request +@@ -409,8 +407,7 @@ CustomLog logs/access_log common env=!image-requestSetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request CustomLog logs/access_log common env=!image-request/web/imagesã¨ã„ã†ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã«ã‚ã‚‹ã¨ä»®å®šã—ã¾ã™ã€‚ --SetEnvIf Referer "^http://www\.example\.com/" local_referal +@@ -224,11 +222,9 @@ Includes - SSI)SetEnvIf Referer "^http://www\.example\.com/" local_referal # Allow browsers that do not send Referer info SetEnvIf Referer "^$" local_referal <Directory /web/images> diff --git a/docs/manual/env.html.ko.euc-kr b/docs/manual/env.html.ko.euc-kr index 4f991b4dc0..1aa7409c37 100644 --- a/docs/manual/env.html.ko.euc-kr +++ b/docs/manual/env.html.ko.euc-kr @@ -312,8 +312,7 @@Ŭ¶óÀÌ¾ðÆ®µéÀÇ ÀÌ¹Ì ¾Ë·ÁÁø ¹®Á¦¸¦ ÇØ°áÇϱâÀ§ÇØ httpd.conf¿¡ ´ÙÀ½ ³»¿ëÀ» Æ÷ÇÔÇÏ±æ ¹Ù¶õ´Ù.
--# +# # ´ÙÀ½ Áö½Ã¾îµéÀº ÀϹÝÀûÀÎ HTTP ÀÀ´äÀ» º¯°æÇÑ´Ù. # ù¹øÂ° Áö½Ã¾î´Â Netscape 2.x¿Í À̸¦ °¡ÀåÇÑ ºê¶ó¿ìÀú¿¡°Ô # keepalive¸¦ »ç¿ëÇÏÁö ¾Ê´Â´Ù. ÀÌµé ºê¶ó¿ìÀú ±¸Çö¿¡ ¹®Á¦°¡ ÀÖ´Ù. @@ -339,8 +338,7 @@ BrowserMatch "JDK/1\.0" force-response-1.0ÀÌ ¿¹Á¦´Â À̹ÌÁö¿¡ ´ëÇÑ ¿äûÀ» Á¢±Ù ·Î±×¿¡ ±â·ÏÇÏÁö ¾Ê´Â´Ù. ƯÁ¤ µð·ºÅ丮¿¡ ´ëÇÑ È¤Àº ƯÁ¤ È£½ºÆ®¿¡¼ ¿Â ¿äûÀ» ·Î±×ÇÏÁö ¾Êµµ·Ï ½±°Ô ¼öÁ¤ÇÒ ¼ö ÀÖ´Ù.
-¼³Á¤À» ±ÇÀåÇÏÁö´Â ¾ÊÀ¸¸ç, Á¦ÇÑµÈ °æ¿ì¿¡¸¸ µ¿ÀÛÇÑ´Ù. ¿ì¸®´Â ¸ðµç À̹ÌÁö°¡ /web/images µð·ºÅ丮 ¾È¿¡ ÀÖ´Ù°í °¡Á¤ÇÑ´Ù. --SetEnvIf Request_URI \.gif image-request +@@ -354,8 +352,7 @@ CustomLog logs/access_log common env=!image-requestSetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request CustomLog logs/access_log common env=!image-request@@ -516,8 +516,7 @@ listfunction ::= listfuncname "(" word ")"-SetEnvIf Referer "^http://www.example.com/" local_referal +SetEnvIf Referer "^http://www.example.com/" local_referal # Referer Á¤º¸¸¦ º¸³»Áö ¾Ê´Â ºê¶ó¿ìÀú¸¦ Çã¿ëÇÑ´Ù SetEnvIf Referer "^$" local_referal <Directory /web/images> diff --git a/docs/manual/expr.html.en b/docs/manual/expr.html.en index 0f9736823c..56672a7781 100644 --- a/docs/manual/expr.html.en +++ b/docs/manual/expr.html.en @@ -58,9 +58,7 @@ that evaluate to a string value. For those, the starting point in the BNF isstring. --+listfunction ::= listfuncname "(" word ")"-expr ::= "true" | "false" +expr ::= "true" | "false" | "!" expr | expr "&&" expr | expr "||" expr @@ -119,9 +117,7 @@ rebackref ::= "$" [0-9] function ::= funcname "(" word ")" -listfunction ::= listfuncname "(" word ")" --@@ -500,8 +496,7 @@ listfunction ::= listfuncname "(" word ")" evaluate requests: --# Compare the host name to example.com and redirect to www.example.com if it matches +# Compare the host name to example.com and redirect to www.example.com if it matches <If "%{HTTP_HOST} == 'example.com'"> Redirect permanent / http://www.example.com/ </If> @@ -514,8 +509,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" -</Directory> -+</Directory>diff --git a/docs/manual/expr.html.fr b/docs/manual/expr.html.fr index 61ee9aff27..ab82dc476e 100644 --- a/docs/manual/expr.html.fr +++ b/docs/manual/expr.html.fr @@ -24,6 +24,8 @@+Cette traduction peut être périmée. Vérifiez la version + anglaise pour les changements récents.Historiquement, il existe de nombreuses variantes dans la syntaxe des expressions permettant d'exprimer une condition dans les @@ -64,8 +66,7 @@
string.--expr ::= "true" | "false" +expr ::= "true" | "false" | "!" expr | expr "&&" expr | expr "||" expr @@ -124,8 +125,7 @@ rebackref ::= "$" [0-9] function ::= funcname "(" word ")" -listfunction ::= listfuncname "(" word ")" -+listfunction ::= listfuncname "(" word ")"Les exemples suivants montent comment utiliser les expressions pour évaluer les requêtes :
--# Comparer le nom d'hôte avec example.com et rediriger vers +# Comparer le nom d'hôte avec example.com et rediriger vers # www.example.com si le nom d'hôte correspond <If "%{HTTP_HOST} == 'example.com'"> Redirect permanent / http://www.example.com/ @@ -533,8 +532,7 @@ listfunction ::= listfuncname "(" word ")" # travail <Directory "/foo/bar/business"> Require expr "%{TIME_HOUR} -gt 9 && %{TIME_HOUR} -lt 17" -</Directory> -+</Directory>diff --git a/docs/manual/expr.xml.fr b/docs/manual/expr.xml.fr index d89d3d2220..930a7b9869 100644 --- a/docs/manual/expr.xml.fr +++ b/docs/manual/expr.xml.fr @@ -1,7 +1,7 @@ - + diff --git a/docs/manual/expr.xml.meta b/docs/manual/expr.xml.meta index d5a2e5e1a5..ea324a8bb2 100644 --- a/docs/manual/expr.xml.meta +++ b/docs/manual/expr.xml.meta @@ -8,6 +8,6 @@diff --git a/docs/manual/handler.html.en b/docs/manual/handler.html.en index e832c17661..6667be8186 100644 --- a/docs/manual/handler.html.en +++ b/docs/manual/handler.html.en @@ -97,10 +97,8 @@ the en -fr +fr htmlextension to trigger the launch of thefooter.plCGI script. --Action add-footer /cgi-bin/footer.pl -AddHandler add-footer .html -+Action add-footer /cgi-bin/footer.pl +AddHandler add-footer .htmlThen the CGI script is responsible for sending the @@ -119,11 +117,9 @@ AddHandler add-footer .html the
-send-as-ishandler, regardless of their filename extensions.-<Directory /web/htdocs/asis> +@@ -137,9 +133,7 @@ AddHandler add-footer .html you may wish to make use of. Specifically, a new record has been added to the<Directory /web/htdocs/asis> SetHandler send-as-is -</Directory> -+</Directory>request_recstructure: -- char *handler -+char *handlerIf you wish to have your module engage a handler, you need diff --git a/docs/manual/handler.html.fr b/docs/manual/handler.html.fr index 29f684f2e0..b51089927f 100644 --- a/docs/manual/handler.html.fr +++ b/docs/manual/handler.html.fr @@ -99,10 +99,8 @@ des fichiers possédant une extension
-htmldéclenchent l'exécution du script CGIfooter.pl.-Action add-footer /cgi-bin/footer.pl -AddHandler add-footer .html -+Action add-footer /cgi-bin/footer.pl +AddHandler add-footer .htmlÀ ce moment-là, le script CGI se charge d'envoyer le document @@ -121,11 +119,9 @@ AddHandler add-footer .html
-send-as-is, sans tenir compte de l'extension de leur nom de fichier.-<Directory /web/htdocs/asis> +@@ -141,9 +137,7 @@ AddHandler add-footer .html Plus précisément, un nouvel enregistrement a été ajouté à la structure<Directory /web/htdocs/asis> SetHandler send-as-is -</Directory> -+</Directory>request_rec: -- char *handler -+char *handlerSi vous voulez que votre module déclenche l'utilisation d'un diff --git a/docs/manual/howto/access.html.en b/docs/manual/howto/access.html.en index 2d11b321c0..b343b51d30 100644 --- a/docs/manual/howto/access.html.en +++ b/docs/manual/howto/access.html.en @@ -69,10 +69,8 @@
The usage of these directives is:
--Require host address -Require ip ip.address -+Require host address +Require ip ip.addressIn the first form, address is a fully qualified @@ -96,12 +94,10 @@ Require ip ip.address board, and you want to keep them out, you could do the following:
--<RequireAll> +<RequireAll> Require all granted Require not ip 10.252.46.165 -</RequireAll> -+</RequireAll>Visitors coming from that address (
10.252.46.165) @@ -115,11 +111,9 @@ Require ip ip.addressAnd, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:
--Require not ip 192.168.205 +Require not ip 192.168.205 Require not host phishers.example.com moreidiots.example -Require not host gov -+Require not host govUse of the
-RequireAll,RequireAny, andRequireNonedirectives may be @@ -135,11 +129,9 @@ Require not host gov based on user-agent (the browser type) you might do the following:-<If "%{HTTP_USER_AGENT} == 'BadBot'"> +<If "%{HTTP_USER_AGENT} == 'BadBot'"> Require All Denied -</If> -+</If>Warning:
@@ -163,12 +155,10 @@ Require not host govFor example, if you wish to block access to a resource between 8pm and 6am, you can do this using
-mod_rewrite.-RewriteEngine On +RewriteEngine On RewriteCond %{TIME_HOUR} >=20 [OR] RewriteCond %{TIME_HOUR} <07 -RewriteRule ^/fridge - [F] -+RewriteRule ^/fridge - [F]This will return a 403 Forbidden response for any request after 8pm diff --git a/docs/manual/howto/access.html.fr b/docs/manual/howto/access.html.fr index c88a519fad..f890d56515 100644 --- a/docs/manual/howto/access.html.fr +++ b/docs/manual/howto/access.html.fr @@ -74,10 +74,8 @@ client
Les directives Require s'utilisent comme suit :
--Require host address -Require ip ip.address -+Require host address +Require ip ip.addressDans la première forme, nom-hôte est un nom de domaine @@ -104,12 +102,10 @@ Require ip ip.address spamer votre forum, vous pouvez ajouter cette ligne pour lui refuser l'accès :
--<RequireAll> +<RequireAll> Require all granted Require not ip 10.252.46.165 -</RequireAll> -+</RequireAll>Les visiteurs possédant cette adresse (
-10.252.46.165) ne pourront pas voir le @@ -124,11 +120,9 @@ Require ip ip.address vous pouvez spécifier des adresses IP partielles ou des noms de domaine, comme ceci :-Require not ip 192.168.205 +Require not ip 192.168.205 Require not host phishers.example.com moreidiots.example -Require not host gov -+Require not host govLes directives
-RequireAll,RequireAny, etRequireNoneouvrent le champ à des @@ -145,11 +139,9 @@ arbitraires fonction du user-agent (le type de navigateur), vous pouvez spécifier ceci :-<If "%{HTTP_USER_AGENT} == 'BadBot'"> +<If "%{HTTP_USER_AGENT} == 'BadBot'"> Require All Denied -</If> -+</If>Avertissement :
@@ -174,12 +166,10 @@ d'accPar exemple, pour bloquer l'accès à une ressources entre 20h et 6h du matin, vous pouvez utiliser
-mod_rewrite:-RewriteEngine On +RewriteEngine On RewriteCond %{TIME_HOUR} >=20 [OR] RewriteCond %{TIME_HOUR} <07 -RewriteRule ^/fridge - [F] -+RewriteRule ^/fridge - [F]Toute requête arrivant après 20h ou avant 7h du matin provoquera diff --git a/docs/manual/howto/auth.html.en b/docs/manual/howto/auth.html.en index 416dc1615e..a1e2052840 100644 --- a/docs/manual/howto/auth.html.en +++ b/docs/manual/howto/auth.html.en @@ -215,14 +215,12 @@ module from each group.
placed inhttpd.confinside a <Directory /usr/local/apache/htdocs/secret> section. --AuthType Basic +AuthType Basic AuthName "Restricted Files" # (Following line optional) AuthBasicProvider file AuthUserFile /usr/local/apache/passwd/passwords -Require user rbowen -+Require user rbowenLet's examine each of those directives individually. The
AuthTypedirective selects @@ -313,15 +311,13 @@ person inNow, you need to modify your
-.htaccessfile to look like the following:-AuthType Basic +AuthType Basic AuthName "By Invitation Only" # Optional line: AuthBasicProvider file AuthUserFile /usr/local/apache/passwd/passwords AuthGroupFile /usr/local/apache/passwd/groups -Require group GroupName -+Require group GroupNameNow, anyone that is listed in the group
GroupName, @@ -379,15 +375,13 @@ Require group GroupNameTo select a dbm file rather than a text file, for example:
--<Directory /www/docs/private> +<Directory /www/docs/private> AuthName "Private" AuthType Basic AuthBasicProvider dbm AuthDBMUserFile /www/passwords/passwd.dbm Require valid-user -</Directory> -+</Directory>Other options are available. Consult the @@ -403,16 +397,14 @@ Require group GroupName scheme that meets your needs. In the following example, both the file and LDAP based authentication providers are being used.
--<Directory /www/docs/private> +<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>In this example the file provider will attempt to authenticate @@ -428,8 +420,7 @@ Require group GroupName authorization methods can also be used. In this example both file group authorization as well as LDAP group authorization is being used.
--<Directory /www/docs/private> +<Directory /www/docs/private> AuthName "Private" AuthType Basic AuthBasicProvider file @@ -438,8 +429,7 @@ Require group GroupName AuthGroupFile /usr/local/apache/passwd/groups Require group GroupName Require ldap-group cn=mygroup,o=yourorg -</Directory> -+</Directory>To take authorization a little further, authorization container @@ -533,37 +523,31 @@ Require group GroupName board, and you want to keep them out, you could do the following:
--<RequireAll> +<RequireAll> Require all granted Require not ip 10.252.46.165 -</RequireAll> -+</RequireAll>Visitors coming from that address will not be able to see the content covered by this directive. If, instead, you have a machine name, rather than an IP address, you can use that.
--<RequireAll> +<RequireAll> Require all granted Require not host host.example.com -</RequireAll> -+</RequireAll>And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:
--<RequireAll> +<RequireAll> Require all granted Require not ip 192.168.205 Require not host phishers.example.com moreidiots.example Require not host ke -</RequireAll> -+</RequireAll>Using
fichier<RequireAll>diff --git a/docs/manual/howto/auth.html.fr b/docs/manual/howto/auth.html.fr index f46d6d4ad2..35188c5603 100644 --- a/docs/manual/howto/auth.html.fr +++ b/docs/manual/howto/auth.html.fr @@ -223,14 +223,12 @@ module de chaque groupe.httpd.confà l'intérieur d'une section <Directory /usr/local/apache/htdocs/secret> : --AuthType Basic +AuthType Basic AuthName "Restricted Files" # (Following line optional) AuthBasicProvider file AuthUserFile /usr/local/apache/passwd/passwords -Require user rbowen -+Require user rbowenExaminons ces directives une à une. La directive
AuthTypedéfinit la méthode @@ -329,15 +327,13 @@ plusieurs personnesMaintenant, vous devez modifier votre fichier
-.htaccesscomme suit :-AuthType Basic +AuthType Basic AuthName "By Invitation Only" # Optional line: AuthBasicProvider file AuthUserFile /usr/local/apache/passwd/passwords AuthGroupFile /usr/local/apache/passwd/groups -Require group GroupName -+Require group GroupNameMaintenant, quiconque appartient au groupe @@ -402,15 +398,13 @@ passe
Par exemple, pour sélectionner un fichier dbm à la place d'un fichier texte :
--<Directory /www/docs/private> +<Directory /www/docs/private> AuthName "Private" AuthType Basic AuthBasicProvider dbm AuthDBMUserFile /www/passwords/passwd.dbm Require valid-user -</Directory> -+</Directory>D'autres options sont disponibles. Consultez la documentation de @@ -429,16 +423,14 @@ d'authentification conjointement les fournisseurs d'authentification file et LDAP :
--<Directory /www/docs/private> +<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>Dans cet exemple, le fournisseur file va tenter d'authentifier @@ -457,8 +449,7 @@ d'authentification autorisation à base de fichier de groupes et une autorisation à base de groupes LDAP.
--<Directory /www/docs/private> +<Directory /www/docs/private> AuthName "Private" AuthType Basic AuthBasicProvider file @@ -467,8 +458,7 @@ d'authentification AuthGroupFile /usr/local/apache/passwd/groups Require group GroupName Require ldap-group cn=mygroup,o=yourorg -</Directory> -+</Directory>Pour un scénario d'autorisation un peu plus avancé, des @@ -568,12 +558,10 @@ autorisation
Par exemple, si vous voulez rejeter les spams dont une machine vous inonde, vous pouvez utiliser ceci :
--<RequireAll> +<RequireAll> Require all granted Require not ip 10.252.46.165 -</RequireAll> -+</RequireAll>Ainsi, les visiteurs en provenance de cette adresse ne @@ -581,26 +569,22 @@ autorisation par contre, vous connaissez le nom de la machine, vous pouvez utiliser ceci :
--<RequireAll> +<RequireAll> Require all granted Require not host host.example.com -</RequireAll> -+</RequireAll>Et si vous voulez interdire l'accès à toutes les machines d'un domaine, vous pouvez spécifier une partie seulement de l'adresse ou du nom de domaine :
--<RequireAll> +<RequireAll> Require all granted Require not ip 192.168.205 Require not host phishers.example.com moreidiots.example Require not host ke -</RequireAll> -+</RequireAll>L'utilisation de la directive
<RequireAll>diff --git a/docs/manual/howto/cgi.html.en b/docs/manual/howto/cgi.html.en index ff953099d7..9ce5f2eb0f 100644 --- a/docs/manual/howto/cgi.html.en +++ b/docs/manual/howto/cgi.html.en @@ -65,9 +65,7 @@ directive has not been commented out. A correctly configured directive may look like this: -- LoadModule cgi_module modules/mod_cgi.so -+LoadModule cgi_module modules/mod_cgi.soScriptAlias
@@ -85,9 +83,7 @@The
-ScriptAliasdirective looks like:- ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/ -+ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/The example shown is from your default
-httpd.conf@@ -141,11 +137,9 @@ file, to specify that CGI execution was permitted in a particular directory:-<Directory /usr/local/apache2/htdocs/somedir> +<Directory /usr/local/apache2/htdocs/somedir> Options +ExecCGI -</Directory> -+</Directory>The above directive tells Apache to permit the execution @@ -154,9 +148,7 @@ files with the
-cgiorplextension as CGI programs:- AddHandler cgi-script .cgi .pl -+AddHandler cgi-script .cgi .pl@@ -175,24 +167,20 @@.cgiin users' directories, you can use the following configuration. --<Directory /home/*/public_html> +<Directory /home/*/public_html> Options +ExecCGI AddHandler cgi-script .cgi -</Directory> -+</Directory>If you wish designate a
-cgi-binsubdirectory of a user's directory where everything will be treated as a CGI program, you can use the following.-<Directory /home/*/public_html/cgi-bin> +@@ -231,11 +219,9 @@ file called<Directory /home/*/public_html/cgi-bin> Options ExecCGI SetHandler cgi-script -</Directory> -+</Directory>first.pl, and put it in yourcgi-bindirectory. --#!/usr/bin/perl +#!/usr/bin/perl print "Content-type: text/html\n\n"; -print "Hello, World."; -+print "Hello, World.";Even if you are not familiar with Perl, you should be able @@ -340,9 +326,7 @@ print "Hello, World."; interpreter (often
-perl) indicated in the first line of your CGI program, which will look something like:- #!/usr/bin/perl -+#!/usr/bin/perlMake sure that this is in fact the path to the @@ -481,16 +465,14 @@ print "Hello, World."; add your own environment variables to the basic ones provided by default.
--#!/usr/bin/perl +diff --git a/docs/manual/howto/cgi.html.fr b/docs/manual/howto/cgi.html.fr index 11bfcfc307..ec62f7f6df 100644 --- a/docs/manual/howto/cgi.html.fr +++ b/docs/manual/howto/cgi.html.fr @@ -65,9 +65,7 @@ commentée dans votre#!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; foreach my $key (keys %ENV) { print "$key --> $ENV{$key}<br>"; -} -+}httpd.conf. Une directive correcte doit ressembler à ceci : -- LoadModule cgi_module modules/mod_cgi.so -+LoadModule cgi_module modules/mod_cgi.soScriptAlias
@@ -82,9 +80,7 @@La directive
-ScriptAliasse présente comme suit :- ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/ -+ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/Cet exemple est tiré de votre fichier de configuration @@ -149,11 +145,9 @@ l'exécution des programmes CGI est permise depuis un répertoire particulier :
--<Directory /usr/local/apache2/htdocs/somedir> +<Directory /usr/local/apache2/htdocs/somedir> Options +ExecCGI -</Directory> -+</Directory>La directive ci-dessus indique à Apache qu'il doit permettre @@ -163,9 +157,7 @@ extension
-cgiouplen tant que programmes CGI :- AddHandler cgi-script .cgi .pl -+AddHandler cgi-script .cgi .pl@@ -186,24 +178,20 @@ répertoire utilisateur, vous pouvez utiliser la configuration suivante : --<Directory /home/*/public_html> +<Directory /home/*/public_html> Options +ExecCGI AddHandler cgi-script .cgi -</Directory> -+</Directory>Pour indiquer un sous-répertoire
-cgi-bind'un répertoire utilisateur où tout fichier sera traité en tant que programme CGI, vous pouvez utiliser ceci :-<Directory /home/*/public_html/cgi-bin> +@@ -243,11 +231,9 @@<Directory /home/*/public_html/cgi-bin> Options ExecCGI SetHandler cgi-script -</Directory> -+</Directory>premier.pl, et placez le dans votre répertoirecgi-bin. --#!/usr/bin/perl +#!/usr/bin/perl print "Content-type: text/html\n\n"; -print "Hello, World."; -+print "Hello, World.";Même si Perl ne vous est pas familier, vous devriez être @@ -362,9 +348,7 @@ print "Hello, World."; trouve à la première ligne de votre programme CGI et qui va ressembler à ceci :
-- #!/usr/bin/perl -+#!/usr/bin/perlAssurez-vous qu'il s'agit bien du chemin correct vers @@ -518,16 +502,14 @@ print "Hello, World."; variables d'environnement aux variables de base fournies par défaut.
--#!/usr/bin/perl +diff --git a/docs/manual/howto/cgi.html.ja.utf8 b/docs/manual/howto/cgi.html.ja.utf8 index e2e2abb853..daa0bf428e 100644 --- a/docs/manual/howto/cgi.html.ja.utf8 +++ b/docs/manual/howto/cgi.html.ja.utf8 @@ -238,11 +238,9 @@ ã¨ã„ã†ãƒ•ァイルã«ä¿å˜ã—ã€ãれを#!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; foreach my $key (keys %ENV) { print "$key --> $ENV{$key}<br>"; -} -+}cgi-binディレクトリã«ç½®ã„ã¦ãã ã•ã„。 --#!/usr/bin/perl
+#!/usr/bin/perl+print "Hello, World.";
print "Content-type: text/html\n\n";
-print "Hello, World."; -Perl ã«ç²¾é€šã—ã¦ã„ãªãã¦ã‚‚〠@@ -460,13 +458,11 @@ print "Hello, World."; ã‚ãªãŸè‡ªèº«ã®ç’°å¢ƒå¤‰æ•°ã‚’åŠ ãˆã‚‹ãŸã‚ã®ã€ 多ãã®ç•°ãªã‚‹æ–¹æ³•を用æ„ã—ã¦ã—ã¾ã™ã€‚
--#!/usr/bin/perl +diff --git a/docs/manual/howto/htaccess.html.en b/docs/manual/howto/htaccess.html.en index e1c08d51fc..a82943880e 100644 --- a/docs/manual/howto/htaccess.html.en +++ b/docs/manual/howto/htaccess.html.en @@ -197,11 +197,9 @@ changes on a per-directory basis.#!/usr/bin/perl print "Content-type: text/html\n\n"; foreach $key (keys %ENV) { print "$key --> $ENV{$key}<br>"; -} -+}Section from your
httpd.conf- file-<Directory /www/htdocs/example> + file<Directory /www/htdocs/example> AddType text/example .exm -</Directory> -+</Directory>However, putting this configuration in your server configuration @@ -266,15 +264,13 @@ changes on a per-directory basis.
prevent script execution while allowing anything else to be set in.htaccessyou can use: --<Directory /www/htdocs> +<Directory /www/htdocs> AllowOverride All </Directory> <Location /> Options +IncludesNoExec -ExecCGI+</Location>
-</Location> -This example assumes that your@@ -301,13 +297,11 @@ changes on a per-directory basis.DocumentRootis/www/htdocs.-
.htaccessfile contents:-AuthType Basic +AuthType Basic AuthName "Password Required" AuthUserFile /www/passwords/password.file AuthGroupFile /www/passwords/group.file -Require Group admins -+Require Group adminsNote that
-AllowOverride AuthConfigmust be in effect @@ -324,11 +318,9 @@ Require Group admins the following configuration directives, placed in a.htaccessfile in the desired directory:-Options +Includes +Options +Includes AddType text/html shtml -AddHandler server-parsed shtml -+AddHandler server-parsed shtmlNote that
-AllowOverride OptionsandAllowOverride @@ -345,20 +337,16 @@ AddHandler server-parsed shtml the execution of CGI programs in a particular directory. This may be implemented with the following configuration:-Options +ExecCGI -AddHandler cgi-script cgi pl -+Options +ExecCGI +AddHandler cgi-script cgi plAlternately, if you wish to have all files in the given directory be considered to be CGI programs, this may be done with the following configuration:
--Options +ExecCGI -SetHandler cgi-script -+Options +ExecCGI +SetHandler cgi-scriptNote that
-AllowOverride OptionsandAllowOverride diff --git a/docs/manual/howto/htaccess.html.fr b/docs/manual/howto/htaccess.html.fr index 7f7eca52e9..2b3cec00a3 100644 --- a/docs/manual/howto/htaccess.html.fr +++ b/docs/manual/howto/htaccess.html.fr @@ -76,9 +76,7 @@ Includes - SSI).config, vous pouvez mettre ceci dans le fichier de configuration de votre serveur :- AccessFileName .config -+AccessFileName .configSection de votre fichier -
httpd.conf-<Directory /www/htdocs/example> +httpd.conf<Directory /www/htdocs/example> AddType text/example .exm -</Directory> -+</Directory>Cependant, la perte de performances sera moindre si vous @@ -302,15 +298,13 @@ Includes - SSI) définition de toute autre option dans les fichiers
-.htaccess, vous pouvez utiliser :-<Directory /www/htdocs> +<Directory /www/htdocs> AllowOverride All </Directory> <Location /> Options +IncludesNoExec -ExecCGI+</Location>
-</Location> -Dans cet exemple, on considère que le chemin défini par la @@ -340,13 +334,11 @@ Includes - SSI)diff --git a/docs/manual/mod/mod_authz_user.html.en b/docs/manual/mod/mod_authz_user.html.en index 8c3cbda3fe..ace8715b2f 100644 --- a/docs/manual/mod/mod_authz_user.html.en +++ b/docs/manual/mod/mod_authz_user.html.en @@ -70,9 +70,7 @@Contenu du fichier
-.htaccess:-AuthType Basic +AuthType Basic AuthName "Password Required" AuthUserFile /www/passwords/password.file AuthGroupFile /www/passwords/group.file -Require Group admins -+Require Group adminsNotez que
-AllowOverride AuthConfigdoit être présent @@ -366,11 +358,9 @@ Includes - SSI) placées dans un fichier.htaccessenregistré dans le répertoire considéré :-Options +Includes +Options +Includes AddType text/html shtml -AddHandler server-parsed shtml -+AddHandler server-parsed shtmlNotez que
-AllowOverride OptionsetAllowOverride @@ -388,20 +378,16 @@ AddHandler server-parsed shtml dans un répertoire particulier. Pour y parvenir, vous pouvez utiliser la configuration suivante :-Options +ExecCGI -AddHandler cgi-script cgi pl -+Options +ExecCGI +AddHandler cgi-script cgi plAlternativement, si vous souhaitez que tous les fichiers d'un répertoire donné soient considérés comme des programmes CGI, vous pouvez utiliser la configuration suivante :
--Options +ExecCGI -SetHandler cgi-script -+Options +ExecCGI +SetHandler cgi-scriptNotez que
-AllowOverride OptionsetAllowOverride diff --git a/docs/manual/howto/public_html.html.en b/docs/manual/howto/public_html.html.en index c69444cac4..f09d957673 100644 --- a/docs/manual/howto/public_html.html.en +++ b/docs/manual/howto/public_html.html.en @@ -137,10 +137,8 @@ You can, likewise, disable the feature for all but a few users by using a configuration like the following:- UserDir disabled+
- UserDir enabled rbowen krietz -UserDir disabled
+ UserDir enabled rbowen krietzSee
-UserDir@@ -156,12 +154,10 @@ directive to make a particular subdirectory of a user's home directory cgi-enabled.-<Directory /home/*/public_html/cgi-bin/> +<Directory /home/*/public_html/cgi-bin/> Options ExecCGI SetHandler cgi-script -</Directory> -+</Directory>Then, presuming that
-UserDiris set to diff --git a/docs/manual/howto/public_html.html.fr b/docs/manual/howto/public_html.html.fr index ecb58ed2fb..bcfc20c7bf 100644 --- a/docs/manual/howto/public_html.html.fr +++ b/docs/manual/howto/public_html.html.fr @@ -150,10 +150,8 @@ avec le syst utilisateurs sauf certains d'entre eux en utilisant une configuration du style :- UserDir disabled+
- UserDir enabled rbowen krietz -UserDir disabled
+ UserDir enabled rbowen krietzVous trouverez d'autres exemples dans la documentation de @@ -168,12 +166,10 @@ avec le syst vous pouvez utiliser une section
-<Directory>pour activer CGI dans un sous-répertoire particulier d'un répertoire home utilisateur.-<Directory /home/*/public_html/cgi-bin/> +<Directory /home/*/public_html/cgi-bin/> Options ExecCGI SetHandler cgi-script -</Directory> -+</Directory>Avec la configuration ci-dessus, et en supposant que diff --git a/docs/manual/howto/ssi.html.en b/docs/manual/howto/ssi.html.en index 5a540dd926..36eb669d4e 100644 --- a/docs/manual/howto/ssi.html.en +++ b/docs/manual/howto/ssi.html.en @@ -92,9 +92,7 @@ existing HTML documents.
To permit SSI on your server, you must have the following directive either in your
-httpd.conffile, or in a.htaccessfile:- Options +Includes -+Options +IncludesThis tells Apache that you want to permit files to be parsed @@ -109,10 +107,8 @@ existing HTML documents.
do this. You can tell Apache to parse any file with a particular file extension, such as.shtml, with the following directives: -- AddType text/html .shtml+
- AddOutputFilter INCLUDES .shtml -AddType text/html .shtml
+ AddOutputFilter INCLUDES .shtmlOne disadvantage to this approach is that if you wanted to @@ -122,9 +118,7 @@ existing HTML documents.
directives would be executed.The other method is to use the
-XBitHackdirective:- XBitHack on -+XBitHack on
XBitHack@@ -446,10 +440,8 @@ modified?In your configuration file, you could put the following line:
-- BrowserMatchNoCase macintosh Mac+
- BrowserMatchNoCase MSIE InternetExplorer -BrowserMatchNoCase macintosh Mac
+ BrowserMatchNoCase MSIE InternetExplorerThis will set environment variables ``Mac'' and diff --git a/docs/manual/howto/ssi.html.fr b/docs/manual/howto/ssi.html.fr index ca34f146ca..e1a32545c6 100644 --- a/docs/manual/howto/ssi.html.fr +++ b/docs/manual/howto/ssi.html.fr @@ -99,9 +99,7 @@ HTML pr devez ajouter la directive suivante dans votre fichier
-httpd.conf, ou dans un fichier.htaccess:- Options +Includes -+Options +IncludesCette directive indique à Apache que vous désirez permettre la @@ -117,10 +115,8 @@ HTML pr directives SSI. Vous devez indiquer à Apache quels fichiers seront concernés. Vous pouvez y parvenir en indiquant une extension, comme
-.shtml, à l'aide des directives suivantes :- AddType text/html .shtml+
- AddOutputFilter INCLUDES .shtml -AddType text/html .shtml
+ AddOutputFilter INCLUDES .shtmlUn des désavantages de cette approche réside dans le fait que si @@ -131,9 +127,7 @@ HTML pr SSI qu'elle contient soient traitées.
Une autre méthode consiste à utiliser la directive
-XBitHack:- XBitHack on -+XBitHack onLa directive
XBitHack@@ -458,10 +452,8 @@ HTML prVous pouvez ajouter les lignes suivantes dans votre fichier de configuration :
-- BrowserMatchNoCase macintosh Mac+
- BrowserMatchNoCase MSIE InternetExplorer -BrowserMatchNoCase macintosh Mac
+ BrowserMatchNoCase MSIE InternetExplorerCes lignes définissent les variables d'environnement "Mac" et diff --git a/docs/manual/logs.html.en b/docs/manual/logs.html.en index 75c10a4723..5ae97eda53 100644 --- a/docs/manual/logs.html.en +++ b/docs/manual/logs.html.en @@ -164,9 +164,7 @@
Do this by specifying the name of the module in your
-LogLeveldirective:- LogLevel info rewrite:trace5 -+LogLevel info rewrite:trace5This sets the main
LogLevelto info, but @@ -219,10 +217,8 @@A typical configuration for the access log might look as follows.
--LogFormat "%h %l %u %t \"%r\" %>s %b" common -CustomLog logs/access_log common -+LogFormat "%h %l %u %t \"%r\" %>s %b" common +CustomLog logs/access_log commonThis defines the nickname
commonand @@ -362,10 +358,8 @@ CustomLog logs/access_log commonAnother commonly used format string is called the Combined Log Format. It can be used as follows.
--LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined -CustomLog log/access_log combined -+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined +CustomLog log/access_log combinedThis format is exactly the same as the Common Log Format, @@ -414,12 +408,10 @@ CustomLog log/access_log combined information. The last two
-CustomLoglines show how to mimic the effects of theReferLogandAgentLogdirectives.-LogFormat "%h %l %u %t \"%r\" %>s %b" common +LogFormat "%h %l %u %t \"%r\" %>s %b" common CustomLog logs/access_log common CustomLog logs/referer_log "%{Referer}i -> %U" -CustomLog logs/agent_log "%{User-agent}i" -+CustomLog logs/agent_log "%{User-agent}i"This example also shows that it is not necessary to define a @@ -440,36 +432,30 @@ CustomLog logs/agent_log "%{User-agent}i" include or exclude requests where the environment variable is set. Some examples:
--# Mark requests from the loop-back interface +# Mark requests from the loop-back interface SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog # Mark requests for the robots.txt file SetEnvIf Request_URI "^/robots\.txt$" dontlog # Log what remains -CustomLog logs/access_log common env=!dontlog -+CustomLog logs/access_log common env=!dontlogAs another example, consider logging requests from english-speakers to one log file, and non-english speakers to a different log file.
-- SetEnvIf Accept-Language "en" english
+SetEnvIf Accept-Language "en" english+ CustomLog logs/non_english_log common env=!english
CustomLog logs/english_log common env=english
- CustomLog logs/non_english_log common env=!english -In a caching scenario one would want to know about the efficiency of the cache. A very simple method to find this out would be:
--SetEnv CACHE_MISS 1 +SetEnv CACHE_MISS 1 LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache -CustomLog logs/access_log common-cache -+CustomLog logs/access_log common-cache
mod_cachewill run before @@ -480,10 +466,8 @@ CustomLog logs/access_log common-cacheIn addition to the
-env=syntax,LogFormatsupports logging values conditional upon the HTTP response code:-LogFormat "%400,501{User-agent}i" browserlog -LogFormat "%!200,304,302{Referer}i" refererlog -+LogFormat "%400,501{User-agent}i" browserlog +LogFormat "%!200,304,302{Referer}i" refererlogIn the first example, the
-User-agentwill be @@ -563,9 +547,7 @@ LogFormat "%!200,304,302{Referer}i" refererlog for this purpose. For example, to rotate the logs every 24 hours, you can use:- CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common -+CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" commonNotice that quotes are used to enclose the entire command @@ -585,10 +567,8 @@ LogFormat "%!200,304,302{Referer}i" refererlog a shell. Use "
-|$" instead of "|" to spawn using a shell (usually with/bin/sh -c):-# Invoke "rotatelogs" using a shell -CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common -+# Invoke "rotatelogs" using a shell +CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" commonThis was the default behaviour for Apache 2.2. @@ -632,10 +612,8 @@ CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" commo later split the log into individual files. For example, consider the following directives.
--LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost -CustomLog logs/access_log comonvhost -+LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost +CustomLog logs/access_log comonvhostThe
%vis used to log the name of the virtual diff --git a/docs/manual/logs.html.fr b/docs/manual/logs.html.fr index 80623713ee..be366228c9 100644 --- a/docs/manual/logs.html.fr +++ b/docs/manual/logs.html.fr @@ -177,9 +177,7 @@Pour ce faire, vous devez spécifier le nom du module dans votre directive
-LogLevel:- LogLevel info rewrite:trace5 -+LogLevel info rewrite:trace5Dans cet exemple, le niveau de journalisation général est défini @@ -234,10 +232,8 @@
Voici une configuration typique pour le journal des accès :
--LogFormat "%h %l %u %t \"%r\" %>s %b" common -CustomLog logs/access_log common -+LogFormat "%h %l %u %t \"%r\" %>s %b" common +CustomLog logs/access_log commonIci est définie l'identité
-commonqui est @@ -386,10 +382,8 @@ CustomLog logs/access_log common "Combined Log Format" (Format de journalisation combiné). Il s'utilise comme suit :-LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined -CustomLog log/access_log combined -+LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined +CustomLog log/access_log combinedCe format est identique au Common Log Format, avec deux champs @@ -439,12 +433,10 @@ CustomLog log/access_log combined comment simuler les effets des directives
-ReferLogetAgentLog.-LogFormat "%h %l %u %t \"%r\" %>s %b" common +LogFormat "%h %l %u %t \"%r\" %>s %b" common CustomLog logs/access_log common CustomLog logs/referer_log "%{Referer}i -> %U" -CustomLog logs/agent_log "%{User-agent}i" -+CustomLog logs/agent_log "%{User-agent}i"Cet exemple montre aussi qu'il n'est pas obligatoire d'associer @@ -470,36 +462,30 @@ CustomLog logs/agent_log "%{User-agent}i" la variable d'environnement est définie. Quelques exemples :
--# Marque les requêtes en provenance de l'interface loop-back +# Marque les requêtes en provenance de l'interface loop-back SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog # Marque les requêtes pour le fichier robots.txt SetEnvIf Request_URI "^/robots\.txt$" dontlog # Journalise toutes les autres requêtes -CustomLog logs/access_log common env=!dontlog -+CustomLog logs/access_log common env=!dontlogAutre exemple, imaginons l'enregistrement des requêtes en provenance d'utilisateurs de langue anglaise dans un journal, et celles des autres utilisateurs dans un autre journal.
-- SetEnvIf Accept-Language "en" english
+SetEnvIf Accept-Language "en" english+ CustomLog logs/non_english_log common env=!english
CustomLog logs/english_log common env=english
- CustomLog logs/non_english_log common env=!english -Dans le contexte d'une mise en cache, il peut être intéressant de connaître l'efficacité du cache. Pour y parvenir, on pourrait utiliser cette méthode simple :
--SetEnv CACHE_MISS 1 +SetEnv CACHE_MISS 1 LogFormat "%h %l %u %t "%r " %>s %b %{CACHE_MISS}e" common-cache -CustomLog logs/access_log common-cache -+CustomLog logs/access_log common-cache-
mod_cacheva s'exécuter avant @@ -513,10 +499,8 @@ CustomLog logs/access_log common-cache valeurs de journalisation conditionnelles basées sur le code de la réponse HTTP :-LogFormat "%400,501{User-agent}i" browserlog -LogFormat "%!200,304,302{Referer}i" refererlog -+LogFormat "%400,501{User-agent}i" browserlog +LogFormat "%!200,304,302{Referer}i" refererlogDans le premier exemple, le
-User-agentsera @@ -609,9 +593,7 @@ LogFormat "%!200,304,302{Referer}i" refererlog appelérotatelogs. Par exemple, pour une rotation des journaux toutes les 24 heures, ajoutez ces lignes :- CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common -+CustomLog "|/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" commonNotez que l'ensemble de la commande qui sera appelée par le tube de @@ -633,10 +615,8 @@ LogFormat "%!200,304,302{Referer}i" refererlog au lieu de "
-|" (en général avec/bin/sh -c) :-# Invocation de "rotatelogs" en utilisant un shell -CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common -+# Invocation de "rotatelogs" en utilisant un shell +CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" common@@ -679,10 +659,8 @@ CustomLog "|$/usr/local/apache/bin/rotatelogs /var/log/access_log 86400" commo journal, puis de séparer ultérieurement le journal en plusieurs journaux individuels. Considérons par exemple les directives suivantes : --LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost -CustomLog logs/access_log comonvhost -+LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost +CustomLog logs/access_log comonvhostLe champ
-%vsert à enregistrer le nom de l'hôte virtuel qui diff --git a/docs/manual/misc/perf-scaling.html.en b/docs/manual/misc/perf-scaling.html.en index 9d47f56cec..72a9201ab7 100644 --- a/docs/manual/misc/perf-scaling.html.en +++ b/docs/manual/misc/perf-scaling.html.en @@ -116,8 +116,7 @@ Linux (Xen) system:diff --git a/docs/manual/mod/mod_authz_owner.html.fr b/docs/manual/mod/mod_authz_owner.html.fr index 39799ef93c..0934d82530 100644 --- a/docs/manual/mod/mod_authz_owner.html.fr +++ b/docs/manual/mod/mod_authz_owner.html.fr @@ -107,15 +107,13 @@ fichiers propriétaire ne soit-top - 23:10:58 up 71 days, 6:14, 4 users, load average: 0.25, 0.53, 0.47 +@@ -148,10 +142,8 @@ protection suppl à verrouiller. Pour ce faire, on attribue le même nom de fichier DBM aux fichiers de groupes et de mots de passe : -top - 23:10:58 up 71 days, 6:14, 4 users, load average: 0.25, 0.53, 0.47 Tasks: 163 total, 1 running, 162 sleeping, 0 stopped, 0 zombie Cpu(s): 11.6%us, 0.7%sy, 0.0%ni, 87.3%id, 0.4%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 2621656k total, 2178684k used, 442972k free, 100500k buffers @@ -173,13 +172,11 @@ Swap: 4194296k total, 860584k used, 3333712k free, 1157552k cached The output of free looks like this: --sctemme@brutus:~$ free ++Swap: 3903784 12540 3891244sctemme@brutus:~$ free total used free shared buffers cached Mem: 4026028 3901892 124136 0 253144 841044 -/+ buffers/cache: 2807704 1218324 -Swap: 3903784 12540 3891244 -vmstat @@ -203,27 +200,23 @@ Swap: 3903784 12540 3891244 -
-[sctemme@GayDeceiver sctemme]$ vmstat 5 3 ++ 0 0 0 0 186236 6704 37516 0 0 0 9 44 314 0 0 100[sctemme@GayDeceiver sctemme]$ vmstat 5 3 procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 0 0 0 0 186252 6688 37516 0 0 12 5 47 311 0 1 99 0 0 0 0 186244 6696 37516 0 0 0 16 41 314 0 0 100 - 0 0 0 0 186236 6704 37516 0 0 0 9 44 314 0 0 100 -And this is output of a server that is under a load of one hundred simultaneous connections fetching static content:
--[sctemme@GayDeceiver sctemme]$ vmstat 5 3 ++11 0 0 0 162780 6864 40436 0 0 0 61 6309 1165 33 28 40[sctemme@GayDeceiver sctemme]$ vmstat 5 3 procs memory swap io system cpu r b w swpd free buff cache si so bi bo in cs us sy id 1 0 1 0 162580 6848 40056 0 0 11 5 150 324 1 1 98 6 0 1 0 163280 6856 40248 0 0 0 66 6384 1117 42 25 32 -11 0 0 0 162780 6864 40436 0 0 0 61 6309 1165 33 28 40 -The first line gives averages since the last reboot. The subsequent lines give information for five second @@ -440,9 +433,7 @@ Swap: 3903784 12540 3891244 can be specified on a per module basis:
-- LogLevel debug mod_ssl:warn -+LogLevel debug mod_ssl:warn@@ -475,15 +466,13 @@ Swap: 3903784 12540 3891244
--195.54.228.42 - - [24/Mar/2007:23:05:11 -0400] "GET /sander/feed/ HTTP/1.1" 200 9747 ++74.6.72.229 - - [24/Mar/2007:23:24:22 -0400] "GET /sander/2006/11/21/os-java/ HTTP/1.0" 200 13457195.54.228.42 - - [24/Mar/2007:23:05:11 -0400] "GET /sander/feed/ HTTP/1.1" 200 9747 64.34.165.214 - - [24/Mar/2007:23:10:11 -0400] "GET /sander/feed/atom HTTP/1.1" 200 9068 60.28.164.72 - - [24/Mar/2007:23:11:41 -0400] "GET / HTTP/1.0" 200 618 85.140.155.56 - - [24/Mar/2007:23:14:12 -0400] "GET /sander/2006/09/27/44/ HTTP/1.1" 200 14172 85.140.155.56 - - [24/Mar/2007:23:14:15 -0400] "GET /sander/2006/09/21/gore-tax-pollution/ HTTP/1.1" 200 15147 74.6.72.187 - - [24/Mar/2007:23:18:11 -0400] "GET /sander/2006/09/27/44/ HTTP/1.0" 200 14172 -74.6.72.229 - - [24/Mar/2007:23:24:22 -0400] "GET /sander/2006/11/21/os-java/ HTTP/1.0" 200 13457 -
@@ -1291,8 +1280,7 @@ Swap: 3903784 12540 3891244 pre-rendered blog pages: - -Listen *:8001 +Listen *:8001 <VirtualHost *:8001> ServerName blog.sandla.org:8001 ServerAdmin sander@temme.net @@ -1316,8 +1304,7 @@ Listen *:8001 Options +ExecCGI Require all granted </Directory> - </VirtualHost> -+ </VirtualHost>@@ -1399,14 +1386,12 @@ Listen *:8001
-httpd.conf:-CacheRoot /raid1/cacheroot +CacheRoot /raid1/cacheroot CacheEnable disk / # A page modified 100 minutes ago will expire in 10 minutes CacheLastModifiedFactor .1 # Always check again after 6 hours -CacheMaxExpire 21600 -+CacheMaxExpire 21600This configuration will try to cache any and all content @@ -1433,11 +1418,9 @@ CacheMaxExpire 21600 Unfortunately there does currently not exist a way to cache these headers.
--<FilesMatch \.(jpe?g|png|gif|js|css|x?html|xml)> +<FilesMatch \.(jpe?g|png|gif|js|css|x?html|xml)> FileETag None -</FilesMatch> -+</FilesMatch>diff --git a/docs/manual/misc/perf-tuning.html.en b/docs/manual/misc/perf-tuning.html.en index 8124dde01e..949d240703 100644 --- a/docs/manual/misc/perf-tuning.html.en +++ b/docs/manual/misc/perf-tuning.html.en @@ -137,12 +137,10 @@ matching the criteria. Here's an example which disables lookups except for
-.htmland.cgifiles:-HostnameLookups off +HostnameLookups off <Files ~ "\.(html|cgi)$"> HostnameLookups on -</Files> -+</Files>But even still, if you just need DNS names in some CGIs you @@ -161,12 +159,10 @@ HostnameLookups off system calls to check up on symlinks. One extra call per filename component. For example, if you had:
--DocumentRoot /www/htdocs +DocumentRoot /www/htdocs <Directory /> Options SymLinksIfOwnerMatch -</Directory> -+</Directory>and a request is made for the URI
-/index.html. @@ -177,16 +173,14 @@ DocumentRoot /www/htdocs every single request. If you really desire the symlinks security checking you can do something like this:-DocumentRoot /www/htdocs +DocumentRoot /www/htdocs <Directory /> Options FollowSymLinks </Directory> <Directory /www/htdocs> Options -FollowSymLinks +SymLinksIfOwnerMatch -</Directory> -+</Directory>This at least avoids the extra checks for the @@ -209,12 +203,10 @@ DocumentRoot /www/htdocs
-.htaccessfor each filename component. For example,-DocumentRoot /www/htdocs +DocumentRoot /www/htdocs <Directory /> AllowOverride all -</Directory> -+</Directory>and a request is made for the URI
-/index.html. @@ -557,8 +549,7 @@ DocumentRoot /www/htdocs do not match the code, they're contrived for pedagogical purposes):- for (;;) { +for (;;) { for (;;) { fd_set accept_fds; @@ -578,8 +569,7 @@ DocumentRoot /www/htdocs if (new_connection != -1) break; } process_the(new_connection); - } -+ }But this naive implementation has a serious starvation problem. @@ -618,8 +608,7 @@ DocumentRoot /www/htdocs entry into the inner loop. The loop looks like this (differences highlighted):
-- for (;;) { +for (;;) { accept_mutex_on (); for (;;) { fd_set accept_fds; @@ -641,8 +630,7 @@ DocumentRoot /www/htdocs } accept_mutex_off (); process the new_connection; - } -+ }The functions @@ -751,8 +739,7 @@ DocumentRoot /www/htdocs
-http_main.c). The function looks roughly like this:- void lingering_close (int s) +void lingering_close (int s) { char junk_buffer[2048]; @@ -774,8 +761,7 @@ DocumentRoot /www/htdocs } close (s); - } -+ }This naturally adds some expense at the end of a connection, diff --git a/docs/manual/misc/perf-tuning.html.fr b/docs/manual/misc/perf-tuning.html.fr index 979038d93b..c7a03ea030 100644 --- a/docs/manual/misc/perf-tuning.html.fr +++ b/docs/manual/misc/perf-tuning.html.fr @@ -151,12 +151,10 @@ Voici un exemple qui désactive les recherches DNS sauf pour les fichiers
-.htmlet.cgi:-HostnameLookups off +HostnameLookups off <Files ~ "\.(html|cgi)$"> HostnameLookups on -</Files> -+</Files>Mais même dans ce cas, si vous n'avez besoin de noms DNS que dans @@ -176,12 +174,10 @@ HostnameLookups off symboliques. Un appel supplémentaire par élément du chemin du fichier. Par exemple, si vous avez :
--DocumentRoot /www/htdocs +DocumentRoot /www/htdocs <Directory /> Options SymLinksIfOwnerMatch -</Directory> -+</Directory>et si une requête demande l'URI
-/index.html, Apache @@ -193,16 +189,14 @@ DocumentRoot /www/htdocs vérifier la sécurité des liens symboliques, vous pouvez utiliser une configuration du style :-DocumentRoot /www/htdocs +DocumentRoot /www/htdocs <Directory /> Options FollowSymLinks </Directory> <Directory /www/htdocs> Options -FollowSymLinks +SymLinksIfOwnerMatch -</Directory> -+</Directory>Ceci évite au moins les vérifications supplémentaires pour le chemin @@ -228,12 +222,10 @@ DocumentRoot /www/htdocs pour chaque élément du chemin du fichier demandé. Par exemple, si vous avez :
--DocumentRoot /www/htdocs +DocumentRoot /www/htdocs <Directory /> AllowOverride all -</Directory> -+</Directory>et qu'une requête demande l'URI
-/index.html, Apache @@ -613,8 +605,7 @@ DocumentRoot /www/htdocs (ces exemples ne sont pas extraits du code d'Apache, ils ne sont proposés qu'à des fins pédagogiques) :- for (;;) { +for (;;) { for (;;) { fd_set accept_fds; @@ -634,8 +625,7 @@ DocumentRoot /www/htdocs if (new_connection != -1) break; } process_the(new_connection); - } -+ }Mais cette implémentation rudimentaire présente une sérieuse lacune. @@ -675,8 +665,7 @@ DocumentRoot /www/htdocs entrées dans la boucle interne. La boucle ressemble à ceci (les différences sont mises en surbrillance) :
-- for (;;) { +for (;;) { accept_mutex_on (); for (;;) { fd_set accept_fds; @@ -698,8 +687,7 @@ DocumentRoot /www/htdocs } accept_mutex_off (); process the new_connection; - } -+ }Les fonctions @@ -812,8 +800,7 @@ DocumentRoot /www/htdocs
-http_main.c). La fonction ressemble approximativement à ceci :- void lingering_close (int s) +void lingering_close (int s) { char junk_buffer[2048]; @@ -835,8 +822,7 @@ DocumentRoot /www/htdocs } close (s); - } -+ }Ceci ajoute naturellement un peu de charge à la fin d'une connexion, diff --git a/docs/manual/misc/security_tips.html.en b/docs/manual/misc/security_tips.html.en index f31b1c1a38..d7f50df8f8 100644 --- a/docs/manual/misc/security_tips.html.en +++ b/docs/manual/misc/security_tips.html.en @@ -334,11 +334,9 @@
In the server configuration file, put
--<Directory /> +<Directory /> AllowOverride None -</Directory> -+</Directory>This prevents the use of
-.htaccessfiles in all @@ -366,25 +364,21 @@ work around this, add the following block to your server's configuration:-<Directory /> +<Directory /> Require all denied -</Directory> -+</Directory>This will forbid default access to filesystem locations. Add appropriate
-Directoryblocks to allow access only in those areas you wish. For example,-<Directory /usr/users/*/public_html> +<Directory /usr/users/*/public_html> Require all granted </Directory> <Directory /usr/local/httpd> Require all granted -</Directory> -+</Directory>Pay particular attention to the interactions of
-LocationandDirectorydirectives; for instance, even @@ -441,11 +435,9 @@ you probably commented out the following in your server configuration file:-<Files ".ht*"> +diff --git a/docs/manual/misc/security_tips.html.fr b/docs/manual/misc/security_tips.html.fr index 5b7b50b0d4..b5cc10776b 100644 --- a/docs/manual/misc/security_tips.html.fr +++ b/docs/manual/misc/security_tips.html.fr @@ -343,11 +343,9 @@<Files ".ht*"> Require all denied -</Files> -+</Files>Ajoutez dans le fichier de configuration du serveur
--<Directory /> +<Directory /> AllowOverride None -</Directory> -+</Directory>Ceci interdit l'utilisation des fichiers
-.htaccessdans @@ -377,11 +375,9 @@ fichiers. Pour l'éviter, ajoutez le bloc suivant à la configuration de votre serveur :-<Directory /> +<Directory /> Require all denied -</Directory> -+</Directory>ceci va interdire l'accès par défaut à tous les fichiers du système de @@ -389,14 +385,12 @@
-Directoryappropriés correspondant aux répertoires auxquels vous voulez autorisez l'accès. Par exemple,-<Directory /usr/users/*/public_html> +<Directory /usr/users/*/public_html> Require all granted </Directory> <Directory /usr/local/httpd> Require all granted -</Directory> -+</Directory>Portez une attention particulière aux interactions entre les directives @@ -459,11 +453,9 @@ qui signifie que vous avez probablement mis en commentaire ce qui suit dans le fichier de configuration de votre serveur :
--<Files ".ht*"> +diff --git a/docs/manual/mod/core.html.en b/docs/manual/mod/core.html.en index 4875bcf7d1..9ef8a70103 100644 --- a/docs/manual/mod/core.html.en +++ b/docs/manual/mod/core.html.en @@ -143,9 +143,7 @@ available<Files ".ht*"> Require all denied -</Files> -+</Files>Using
-nonefor an argument will disable any accept filters for that protocol. This is useful for protocols that require a server send data first, such asftp:ornntp:- AcceptFilter nntp none -+AcceptFilter nntp noneThe default protocol names are
httpsfor port 443 @@ -155,10 +153,8 @@ available directive.The default values on FreeBSD are:
--AcceptFilter http httpready -AcceptFilter https dataready -+AcceptFilter http httpready +AcceptFilter https datareadyThe
httpreadyaccept filter buffers entire HTTP requests at @@ -170,10 +166,8 @@ AcceptFilter https dataready accf_data(9) filter is used.The default values on Linux are:
--AcceptFilter http data -AcceptFilter https data -+AcceptFilter http data +AcceptFilter https dataLinux's
TCP_DEFER_ACCEPTdoes not support buffering http @@ -184,10 +178,8 @@ AcceptFilter https data tcp(7) man page.The default values on Windows are:
--AcceptFilter http data -AcceptFilter https data -+AcceptFilter http data +AcceptFilter https dataWindow's mpm_winnt interprets the AcceptFilter to toggle the AcceptEx() @@ -269,13 +261,11 @@ AcceptFilter https data the request, so you can use the following configuration to enable such a script:
--<Files "mypaths.shtml"> +@@ -305,11 +295,9 @@ AcceptFilter https data<Files "mypaths.shtml"> Options +Includes SetOutputFilter INCLUDES AcceptPathInfo On -</Files> -+</Files>/usr/local/.acland/usr/local/web/.aclfor directives, unless they have been disabled with --<Directory /> +<Directory /> AllowOverride None -</Directory> -+</Directory>See also
@@ -591,10 +579,8 @@ NoDecode option available in 2.3.12 and later.Example:
--AllowOverride None -AllowOverrideList Redirect RedirectMatch -+AllowOverride None +AllowOverrideList Redirect RedirectMatchIn the example above only the
Redirectand @@ -603,10 +589,8 @@ AllowOverrideList Redirect RedirectMatchExample:
--AllowOverride AuthConfig -AllowOverrideList CookieTracking CookieName -+AllowOverride AuthConfig +AllowOverrideList CookieTracking CookieNameIn the example above
AllowOverride @@ -698,9 +682,7 @@ headers will be relative toServerRoot.Example
--DefaultRuntimeDir scratch/ -+DefaultRuntimeDir scratch/The default location of
-DefaultRuntimeDirmay be @@ -776,8 +758,7 @@ which no other media type configuration could be found. the${VAR}syntax. The variable is always globally defined and not limited to the scope of the surrounding config section.-<IfDefine TEST> +<IfDefine TEST> Define servername test.example.com </IfDefine> <IfDefine !TEST> @@ -785,8 +766,7 @@ which no other media type configuration could be found. Define SSL </IfDefine> -DocumentRoot /var/www/${servername}/htdocs -+DocumentRoot /var/www/${servername}/htdocsVariable names may not contain colon ":" characters, to avoid clashes @@ -819,11 +799,9 @@ named file-system directory, sub-directories, and their contents.
-/home/user/public_html, but<Directory /home/*/public_html>will match. Example:-<Directory "/usr/local/httpd/htdocs"> +<Directory "/usr/local/httpd/htdocs"> Options Indexes FollowSymLinks -</Directory> -+</Directory>@@ -839,11 +817,9 @@ named file-system directory, sub-directories, and their contents. expressions can also be used, with the addition of the@@ -1224,11 +1184,9 @@ version 2.3.9.~character. For example: --<Directory ~ "^/www/[0-9]{3}"> +<Directory ~ "^/www/[0-9]{3}"> -</Directory> -+</Directory>would match directories in
-/www/that consisted of @@ -855,15 +831,13 @@ named file-system directory, sub-directories, and their contents. first, interspersed with the directives from the .htaccess files. For example, with-<Directory /> +<Directory /> AllowOverride None </Directory> <Directory "/home"> AllowOverride FileInfo -</Directory> -+</Directory>for access to the document
-/home/web/dir/doc.html@@ -886,11 +860,9 @@ named file-system directory, sub-directories, and their contents. expressions are tested in the order they appeared in the configuration file. For example, with-<Directory ~ "abc$"> +<Directory ~ "abc$"> # ... directives here ... -</Directory> -+</Directory>the regular expression section won't be considered until after @@ -906,11 +878,9 @@ named file-system directory, sub-directories, and their contents. recommended that you change this with a block such as
--<Directory /> +<Directory /> Require all denied -</Directory> -+</Directory>and then override this for directories you @@ -947,11 +917,9 @@ the contents of file-system directories matching a regular expression. However, it takes as an argument a regular expression. For example:
--<DirectoryMatch "^/www/(.+/)?[0-9]{3}"> +<DirectoryMatch "^/www/(.+/)?[0-9]{3}"> # ... -</DirectoryMatch> -+</DirectoryMatch>would match directories in
-/www/that consisted of three @@ -978,11 +946,9 @@ the contents of file-system directories matching a regular expression.mod_rewrite. In order to prevent confusion, numbered (unnamed) backreferences are ignored. Use named groups instead.-<DirectoryMatch ^/var/www/combined/(?<sitename>[^/]+)> +<DirectoryMatch ^/var/www/combined/(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</DirectoryMatch> -+</DirectoryMatch>See also
@@ -1048,14 +1014,12 @@ satisfied by a request at runtime in the same scope has not been applied. For example: In --<If "-z req('Host')"> +<If "-z req('Host')"> # ... </If> <Else> # ... -</Else> -+</Else>The
-<If>would match HTTP/1.0 @@ -1096,8 +1060,7 @@ satisfied<ElseIf>section in the same scope has not been applied. For example: In-<If "-R '10.1.0.0/16'"> +<If "-R '10.1.0.0/16'"> #... </If> <ElseIf "-R '10.0.0.0/8'"> @@ -1105,8 +1068,7 @@ satisfied </ElseIf> <Else> #... -</Else> -+</Else>The
<ElseIf>would match if @@ -1168,11 +1130,9 @@ for a complete reference and more examples.For NFS mounted files, this feature may be disabled explicitly for the offending files by specifying:
--<Directory "/path-to-nfs-files"> +<Directory "/path-to-nfs-files"> EnableMMAP Off -</Directory> -+</Directory>For network mounted files, this feature may be disabled explicitly for the offending files by specifying:
--<Directory "/path-to-nfs-files"> +<Directory "/path-to-nfs-files"> EnableSendfile Off -</Directory> -+</Directory>Please note that the per-directory and .htaccess configuration of
-EnableSendfileis not supported by @@ -1253,8 +1211,7 @@ version 2.3.9. configuration parsing. The typical use is for reporting required modules which are missing from the configuration.-# Example +@@ -1313,13 +1269,11 @@ in case of an error full URL which the client can resolve. Alternatively, a message can be provided to be displayed by the browser. Examples: -# Example # ensure that mod_include is loaded <IfModule !include_module> Error "mod_include is required by mod_foo. Load it with LoadModule." @@ -1270,8 +1227,7 @@ version 2.3.9. <IfDefine !NOSSL> Error "Either SSL or NOSSL must be defined." </IfDefine> -</IfDefine> -+</IfDefine>-ErrorDocument 500 http://foo.example.com/cgi-bin/tester +ErrorDocument 500 http://foo.example.com/cgi-bin/tester ErrorDocument 404 /cgi-bin/bad_urls.pl ErrorDocument 401 /subscription_info.html ErrorDocument 403 "Sorry can't allow you access today" -ErrorDocument 403 Forbidden! -+ErrorDocument 403 Forbidden!Additionally, the special value
-defaultcan be used @@ -1328,13 +1282,11 @@ ErrorDocument 403 Forbidden! Apache httpd's simple hardcoded message for configurations that would otherwise inherit an existingErrorDocument.-ErrorDocument 404 /cgi-bin/bad_urls.pl +ErrorDocument 404 /cgi-bin/bad_urls.pl <Directory /web/docs> ErrorDocument 404 default -</Directory> -+</Directory>Note that when you specify an
-ErrorDocument@@ -1454,10 +1406,8 @@ ErrorDocument 404 /cgi-bin/bad_urls.pl supplementary information is logged in the error log in addition to the actual log message.-#Simple example -ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" -+#Simple example +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"Specifying
-connectionorrequestas first @@ -1586,10 +1536,8 @@ ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" with error log lines. Ifmod_unique_idis loaded, its unique id will be used as log ID for requests.-#Example (default format for threaded MPMs) -ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" -+#Example (default format for threaded MPMs) +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"This would result in error messages such as:
@@ -1601,20 +1549,16 @@ ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%Notice that, as discussed above, some fields are omitted entirely because they are not defined.
--#Example (similar to the 2.2.x format) -ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" -+#Example (similar to the 2.2.x format) +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"--#Advanced example with request/connection log IDs +@@ -1756,25 +1700,21 @@ filenames#Advanced example with request/connection log IDs ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M" ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T" ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'" ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'" -ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A" -+ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"The filename argument should include a filename, or a wild-card string, where
-?matches any single character, and*matches any sequences of characters.-<Files "cat.html"> +<Files "cat.html"> # Insert stuff that applies to cat.html here </Files> <Files "?at.*"> # This would apply to cat.html, bat.html, hat.php and so on. -</Files> -+</Files>Regular expressions can also be used, with the addition of the
-~character. For example:-<Files ~ "\.(gif|jpe?g|png)$"> +<Files ~ "\.(gif|jpe?g|png)$"> #... -</Files> -+</Files>would match most common Internet graphics formats.
-<FilesMatch>is preferred, @@ -1809,11 +1749,9 @@ filenames does. However, it accepts a regular expression. For example:-<FilesMatch "\.(gif|jpe?g|png)$"> +<FilesMatch "\.(gif|jpe?g|png)$"> # ... -</FilesMatch> -+</FilesMatch>would match most common Internet graphics formats.
@@ -1825,11 +1763,9 @@ filenamesmod_rewrite. In order to prevent confusion, numbered (unnamed) backreferences are ignored. Use named groups instead. --<FilesMatch ^(?<sitename>[^/]+)> +<FilesMatch ^(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</FilesMatch> -+</FilesMatch>See also
@@ -1871,8 +1807,7 @@ media type in the HTTP Content-Type header fieldForceTypesettings by using the value ofNone: --# force all files to be image/gif: +# force all files to be image/gif: <Location /images> ForceType image/gif </Location> @@ -1880,8 +1815,7 @@ media type in the HTTP Content-Type header field # but normal mime-type associations here: <Location /images/mixed> ForceType None -</Location> -+</Location>This directive primarily overrides the content types generated for @@ -2049,8 +1983,7 @@ if a test is true at startup multiple-parameter tests. Example:
-
httpd -DReverseProxy -DUseCache -DMemCache ...-<IfDefine ReverseProxy> +@@ -2154,18 +2086,14 @@ wildcard matching available in 2.3.6 and later<IfDefine ReverseProxy> LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so <IfDefine UseCache> @@ -2062,8 +1995,7 @@ if a test is true at startup LoadModule cache_disk_module modules/mod_cache_disk.so </IfDefine> </IfDefine> -</IfDefine> -+</IfDefine>Examples:
--Include /usr/local/apache2/conf/ssl.conf -Include /usr/local/apache2/conf/vhosts/*.conf -+Include /usr/local/apache2/conf/ssl.conf +Include /usr/local/apache2/conf/vhosts/*.confOr, providing paths relative to your
-ServerRootdirectory:-Include conf/ssl.conf -Include conf/vhosts/*.conf -+Include conf/ssl.conf +Include conf/vhosts/*.confWildcards may be included in the directory or file portion of the @@ -2305,11 +2233,9 @@ methods only to the methods
-POST,PUT, andDELETE, leaving all other methods unprotected:-<Limit POST PUT DELETE> +<Limit POST PUT DELETE> Require valid-user -</Limit> -+</Limit>The method names listed can be one or more of:
-GET, @@ -2346,14 +2272,12 @@ methodsRequire group editorsdirective will be ignored in all cases:-<LimitExcept GET> +@@ -2379,11 +2303,9 @@ except the named ones<LimitExcept GET> Require valid-user </LimitExcept> <Limit POST> Require group editors -</Limit> -+</Limit>For example:
--<LimitExcept POST GET> +@@ -2668,22 +2590,18 @@ URLs /private1, /private1/ and /private1/file.txt will have the enclosed directives applied, but /private1other would not. -<LimitExcept POST GET> Require valid-user -</LimitExcept> -+</LimitExcept>-<Location /private1> +<Location /private1> # ... -</Location> -+</Location>In the example below, where a trailing slash is used, requests to /private2/ and /private2/file.txt will have the enclosed directives applied, but /private2 and /private2other would not.
--<Location /private2/> +<Location /private2/> # ... -</Location> -+</Location>When to use
@@ -2710,11 +2628,9 @@ URLs can also be used, with the addition of the<Location>~character. For example: --<Location ~ "/(extra|special)/data"> +<Location ~ "/(extra|special)/data"> #... -</Location> -+</Location>would match URLs that contained the substring
-/extra/data@@ -2729,12 +2645,10 @@ URLs directive. For example, to enable status requests, but allow them only from browsers atexample.com, you might use:-<Location /status> +<Location /status> SetHandler server-status Require host example.com -</Location> -+</Location>@@ -2533,11 +2457,9 @@ sauf celles qui sont spNote about / (slash)
@@ -2781,11 +2695,9 @@ matching URLs it takes a regular expression as an argument instead of a simple string. For example: --<LocationMatch "/(extra|special)/data"> +<LocationMatch "/(extra|special)/data"> # ... -</LocationMatch> -+</LocationMatch>would match URLs that contained the substring
-/extra/data@@ -2798,11 +2710,9 @@ matching URLsmod_rewrite. In order to prevent confusion, numbered (unnamed) backreferences are ignored. Use named groups instead.-<LocationMatch ^/combined/(?<sitename>[^/]+)> +<LocationMatch ^/combined/(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</LocationMatch> -+</LocationMatch>See also
@@ -2994,21 +2904,17 @@ matching URLs as module specification. This means the following three specifications are equivalent: --LogLevel info ssl:warn +LogLevel info ssl:warn LogLevel info mod_ssl.c:warn -LogLevel info ssl_module:warn -+LogLevel info ssl_module:warnIt is also possible to change the level per directory:
--LogLevel info +LogLevel info <Directory "/usr/local/apache/htdocs/app"> LogLevel debug -</Directory> -+</Directory>@@ -3063,10 +2969,8 @@ LogLevel info@@ -2296,19 +2228,15 @@ gExamples:
-- LogLevelOverride 192.0.2.0/24 ssl:trace6 - LogLevelOverride 192.0.2.7 ssl:trace8 -+LogLevelOverride 192.0.2.0/24 ssl:trace6 + LogLevelOverride 192.0.2.7 ssl:trace8@@ -3424,10 +3328,8 @@ or specified mutexes@@ -3578,15 +3480,13 @@ directory/var/httpd/locks. The mutex mechanism for all other mutexes will be changed from the compiled-in default tosysvsem. --Mutex sysvsem default -Mutex fcntl:/var/httpd/locks mpm-accept -+Mutex sysvsem default +Mutex fcntl:/var/httpd/locks mpm-acceptFor example, without any
-+and-symbols:-<Directory "/web/docs"> +<Directory "/web/docs"> Options Indexes FollowSymLinks </Directory> <Directory "/web/docs/spec"> Options Includes -</Directory> -+</Directory>then only
-Includeswill be set for the @@ -3594,15 +3494,13 @@ directoryOptionsdirective uses the+and-symbols:-<Directory "/web/docs"> +<Directory "/web/docs"> Options Indexes FollowSymLinks </Directory> <Directory "/web/docs/spec"> Options +Includes -Indexes -</Directory> -+</Directory>then the options
-FollowSymLinksand @@ -3920,15 +3818,13 @@ to name-virtual hosts alternate names for a host, for use with name-based virtual hosts. TheServerAliasmay include wildcards, if appropriate.-<VirtualHost *:80> +<VirtualHost *:80> ServerName server.example.com ServerAlias server server2.example.com server2 ServerAlias *.example.com UseCanonicalName Off # ... -</VirtualHost> -+</VirtualHost>Name-based virtual hosts for the best-matching set of
-<virtualhost>s are processed @@ -4219,21 +4115,17 @@ handlerhttp://servername/statuswas called, you might put the following intohttpd.conf:-<Location "/status"> +<Location "/status"> SetHandler server-status -</Location> -+</Location>You could also use this directive to configure a particular handler for files with a particular file extension. For example:
--<FilesMatch \.php$> +<FilesMatch \.php$> SetHandler application/x-httpd-php -</FilesMatch> -+</FilesMatch>You can override an earlier defined
-SetHandler@@ -4298,11 +4190,9 @@ server in the/www/data/directory for server-side includes.-<Directory "/www/data/"> +<Directory "/www/data/"> SetOutputFilter INCLUDES -</Directory> -+</Directory>If more than one filter is specified, they must be separated @@ -4553,15 +4443,13 @@ hostname or IP address -
-<VirtualHost 10.1.2.3:80> +@@ -4569,15 +4457,13 @@ hostname or IP address the optional port number could not be determined otherwise. An IPv6 example is shown below: -<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>-<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> +<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> ServerAdmin webmaster@host.example.com DocumentRoot /www/docs/host.example.com ServerName host.example.com ErrorLog logs/host.example.com-error_log TransferLog logs/host.example.com-access_log -</VirtualHost> -+</VirtualHost>Each Virtual Host must correspond to a different IP address, @@ -4648,8 +4534,7 @@ hostname or IP address configuration parsing is not halted. The typical use it to check whether some user define options are set, and warn if not.
--# Example +diff --git a/docs/manual/mod/core.html.fr b/docs/manual/mod/core.html.fr index ee8aaea329..494ce15947 100644 --- a/docs/manual/mod/core.html.fr +++ b/docs/manual/mod/core.html.fr @@ -145,9 +145,7 @@ d'acceptation filtre d'acceptation pour ce protocole. Ceci s'avère utile pour les protocoles qui nécessitent l'envoi de données par le serveur en premier, comme# Example # tell when ReverseProxy is not set <IfDefine !ReverseProxy> Warning "reverse proxy is not started, hope this is okay!" @@ -4657,8 +4542,7 @@ hostname or IP address <IfDefine ReverseProxy> # define custom proxy configuration -</IfDefine> -+</IfDefine>ftp:ounntp: -- AcceptFilter nntp none -+AcceptFilter nntp noneLes noms de protocoles par défaut sont
httpspour le @@ -156,10 +154,8 @@ d'acceptation ajoutez l'argument protocol à la directiveListen.Sous FreeBSD, les valeurs par défaut sont :
--AcceptFilter http httpready -AcceptFilter https dataready -+AcceptFilter http httpready +AcceptFilter https datareadyLe filtre d'acceptation
httpreadymet en tampon des @@ -169,10 +165,8 @@ AcceptFilter https dataready HTTPS sont chiffrées, celles-ci n'autorisent que le filtre accf_data(9).Sous Linux, les valeurs par défaut sont :
--AcceptFilter http data -AcceptFilter https data -+AcceptFilter http data +AcceptFilter https dataLe filtre
TCP_DEFER_ACCEPTde Linux ne supporte pas @@ -182,10 +176,8 @@ AcceptFilter https data manuel Linux de tcp(7).Sous Windows, les valeurs par défaut sont :
--AcceptFilter http data -AcceptFilter https data -+AcceptFilter http data +AcceptFilter https dataLe module MPM pour Windows mpm_winnt utilise la directive @@ -270,13 +262,11 @@ nom de chemin en fin de requ sur
-PATH_INFO. Le gestionnaire de base va en général rejeter la requête, et vous pouvez utiliser la configuration suivante pour utiliser un tel script :-<Files "mypaths.shtml"> +@@ -309,11 +299,9 @@ nom de chemin en fin de requ pour y lire d'éventuelles directives, à moins quelles n'aient été désactivées avec -<Files "mypaths.shtml"> Options +Includes SetOutputFilter INCLUDES AcceptPathInfo On -</Files> -+</Files>-<Directory /> +<Directory /> AllowOverride None -</Directory> -+</Directory>Voir aussi
@@ -616,10 +604,8 @@ All pour les versions antExample:
--AllowOverride None -AllowOverrideList Redirect RedirectMatch -+AllowOverride None +AllowOverrideList Redirect RedirectMatchDans l'exemple ci-dessus, seules les directives @@ -628,10 +614,8 @@ AllowOverrideList Redirect RedirectMatch
Example:
--AllowOverride AuthConfig -AllowOverrideList CookieTracking CookieName -+AllowOverride AuthConfig +AllowOverrideList CookieTracking CookieNameDans l'exemple ci-dessus, la directive
AllowOverrideautorise les directives du @@ -727,9 +711,7 @@ dans la rServerRoot.Example
--DefaultRuntimeDir scratch/ -+DefaultRuntimeDir scratch/La valeur par défaut de la directive @@ -810,8 +792,7 @@ DESACTIV La portée de la variable est toujours globale, et n'est jamais limitée à la section de configuration courante.
--<IfDefine TEST> +<IfDefine TEST> Define servername test.example.com </IfDefine> <IfDefine !TEST> @@ -819,8 +800,7 @@ DESACTIV Define SSL </IfDefine> - DocumentRoot /var/www/${servername}/htdocs -+ DocumentRoot /var/www/${servername}/htdocsLe caractère ":" est interdit dans les noms de variables afin @@ -857,11 +837,9 @@ sous-r *
-/home/user/public_html, alors que<Directory /home/*/public_html>conviendra. Exemple :-<Directory "/usr/local/httpd/htdocs"> +<Directory "/usr/local/httpd/htdocs"> Options Indexes FollowSymLinks -</Directory> -+</Directory>@@ -878,11 +856,9 @@ sous-r peuvent aussi être utilisées en ajoutant le caractère@@ -1283,11 +1243,9 @@ fichiers aux clients explicitement désactivée pour les fichiers concernés en spécifiant : -~. Par exemple : --<Directory ~ "^/www/[0-9]{3}"> +<Directory ~ "^/www/[0-9]{3}"> -</Directory> -+</Directory>pourra correspondre à tout répertoire situé dans /www/ et dont le @@ -895,15 +871,13 @@ sous-r directives des fichiers .htaccess. Par exemple, avec
--<Directory /> +<Directory /> AllowOverride None </Directory> <Directory "/home"> AllowOverride FileInfo -</Directory> -+</Directory>l'accès au document
-/home/web/dir/doc.htmlemprunte @@ -929,11 +903,9 @@ sous-r testés selon l'ordre dans lequel ils apparaissent dans le fichier de configuration. Par exemple, avec-<Directory ~ "abc$"> +<Directory ~ "abc$"> # ... directives ici ... -</Directory> -+</Directory>la section avec expression rationnelle ne sera prise en compte @@ -949,11 +921,9 @@ sous-r correspondant à une URL. Il est recommandé de modifier cette situation à l'aide d'un bloc du style
--<Directory /> +<Directory /> Require all denied -</Directory> -+</Directory>puis d'affiner la configuration pour les répertoires que vous @@ -989,11 +959,9 @@ du syst précisé (et aux fichiers qu'il contient), comme pour la section
-<Directory>. Cependant, le répertoire est précisé sous la forme d'une expression rationnelle. Par exemple :-<DirectoryMatch "^/www/(.+/)?[0-9]{3}"> +<DirectoryMatch "^/www/(.+/)?[0-9]{3}"> # ... -</DirectoryMatch> -+</DirectoryMatch>conviendrait pour les sous-répertoires de
-/www/dont @@ -1024,11 +992,9 @@ du syst nommées) sont ignorées. Vous devez utiliser à la place des groupes nommés.-<DirectoryMatch ^/var/www/combined/(?<sitename>[^/]+)> +<DirectoryMatch ^/var/www/combined/(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</DirectoryMatch> -+</DirectoryMatch>Voir aussi
@@ -1096,14 +1062,12 @@ requ supérieure et dans la même portée n'ont pas été satisfaites. Par exemple, dans : --<If "-z req('Host')"> +<If "-z req('Host')"> # ... </If> <Else> # ... -</Else> -+</Else>La condition de la section
-<If>serait satisfaite pour les requêtes @@ -1142,8 +1106,7 @@ alors que la condition correspondant ou<ElseIf>de la même portée ne l'est pas. Par exemple, dans :-<If "-R '10.1.0.0/16'"> +<If "-R '10.1.0.0/16'"> #... </If> <ElseIf "-R '10.0.0.0/8'"> @@ -1151,8 +1114,7 @@ alors que la condition correspondant </ElseIf> <Else> #... -</Else> -+</Else>La condition correspondant à la section
-<ElseIf>est satisfaite si l'adresse @@ -1219,11 +1181,9 @@ lire les fichiers pendant qu'ils sont servis explicitement désactivée pour les fichiers concernés en spécifiant :-<Directory "/path-to-nfs-files"> +<Directory "/path-to-nfs-files"> EnableMMAP Off -</Directory> -+</Directory>-<Directory "/path-to-nfs-files"> +<Directory "/path-to-nfs-files"> EnableSendfile Off -</Directory> -+</Directory>Veuillez noter que la configuration de la directive
-EnableSendfiledans un contexte de répertoire @@ -1314,8 +1272,7 @@ d'erreur personnalis directive peut être utilisée pour générer un message d'erreur personnalisé, et interrompre la lecture de la configuration.-# Exemple +@@ -1376,13 +1332,11 @@ d'erreur Alternativement, un message à afficher par le navigateur pourra être fourni. Exemples : -# Exemple # vérification du chargement de mod_include <IfModule !include_module> Error "mod_include is required by mod_foo. Load it with LoadModule." @@ -1331,8 +1288,7 @@ d'erreur personnalis <IfDefine !NOSSL> Error "Either SSL or NOSSL must be defined." </IfDefine> -</IfDefine> -+</IfDefine>-ErrorDocument 500 http://foo.example.com/cgi-bin/tester +ErrorDocument 500 http://foo.example.com/cgi-bin/tester ErrorDocument 404 /cgi-bin/bad_urls.pl ErrorDocument 401 /subscription_info.html ErrorDocument 403 "Sorry can't allow you access today" -ErrorDocument 403 Forbidden! -+ErrorDocument 403 Forbidden!De plus, on peut spécifier la valeur spéciale
-default@@ -1393,13 +1347,11 @@ ErrorDocument 403 Forbidden! les configurations qui sans cela, hériteraient d'une directiveErrorDocumentexistante.-ErrorDocument 404 /cgi-bin/bad_urls.pl +ErrorDocument 404 /cgi-bin/bad_urls.pl <Directory /web/docs> ErrorDocument 404 default -</Directory> -+</Directory>Notez que lorsque vous spécifiez une directive @@ -1534,10 +1486,8 @@ personnalisation des r spécifier quelles informations supplémentaires vont être enregistrées dans le journal des erreurs en plus du message habituel.
--# Exemple simple -ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" -+# Exemple simple +ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M"La spécification de
-connectionou @@ -1682,10 +1632,8 @@ ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: [client %a] %M" c'est son identifiant unique qui sera utilisé comme identifiant de journal pour les requêtes.-# Exemple (format par défaut pour les MPMs threadés) -ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" -+# Exemple (format par défaut pour les MPMs threadés) +ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"Cet exemple renverrait un message d'erreur du style :
@@ -1697,20 +1645,16 @@ ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M%Notez que, comme indiqué plus haut, certains champs sont totalement supprimés s'ils n'ont pas été définis.
--# Exemple (similaire au format 2.2.x) -ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i" -+# Exemple (similaire au format 2.2.x) +ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"--# Exemple avancé avec identifiants journal de requête/connexion +@@ -1868,26 +1812,22 @@ pr ou une chaîne de caractères avec caractères génériques, où# Exemple avancé avec identifiants journal de requête/connexion ErrorLogFormat "[%{uc}t] [%-m:%-l] [R:%L] [C:%{C}L] %7F: %E: %M" ErrorLogFormat request "[%{uc}t] [R:%L] Request %k on C:%{c}L pid:%P tid:%T" ErrorLogFormat request "[%{uc}t] [R:%L] UA:'%+{User-Agent}i'" ErrorLogFormat request "[%{uc}t] [R:%L] Referer:'%+{Referer}i'" -ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A" -+ErrorLogFormat connection "[%{uc}t] [C:%{c}L] local\ %a remote\ %A"?remplace un caractère, et*toute chaîne de caractères. --<Files "cat.html"> +<Files "cat.html"> # Insérer ici des directives qui s'appliquent au fichier cat.html </Files> <Files "?at.*"> # Les directives insérées ici s'appliqueront aux fichiers # cat.html, bat.html, hat.php, et ainsi de suite. -</Files> -+</Files>On peut aussi utiliser les Expressions rationnelles en ajoutant la caractère
-~. Par exemple :-<Files ~ "\.(gif|jpe?g|png)$"> +<Files ~ "\.(gif|jpe?g|png)$"> #... -</Files> -+</Files>correspondrait à la plupart des formats graphiques de l'Internet. @@ -1925,11 +1865,9 @@ sp expressions rationnelles. Par exemple :
--<FilesMatch "\.(gif|jpe?g|png)$"> +<FilesMatch "\.(gif|jpe?g|png)$"> # ... -</FilesMatch> -+</FilesMatch>correspondrait à la plupart des formats graphiques de @@ -1945,11 +1883,9 @@ sp nommées) sont ignorées. Vous devez utiliser à la place des groupes nommés.
--<FilesMatch ^(?<sitename>[^/]+)> +<FilesMatch ^(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</FilesMatch> -+</FilesMatch>Voir aussi
@@ -1990,8 +1926,7 @@ HTTP Content-Type pour les fichiers correspondantsForceTypeen affectant la valeurNoneà l'argument type médium : --# force le type MIME de tous les fichiers à image/gif: +# force le type MIME de tous les fichiers à image/gif: <Location /images> ForceType image/gif </Location> @@ -2000,8 +1935,7 @@ HTTP Content-Type pour les fichiers correspondants # dans le sous-répertoire suivant : <Location /images/mixed> ForceType None -</Location> -+</Location>A la base, cette directive écrase le type de contenu généré pour @@ -2183,8 +2117,7 @@ test retourne "vrai" au d multi-paramètres simple. Exemple :
-
httpd -DReverseProxy -DUseCache -DMemCache ...-<IfDefine ReverseProxy> +<IfDefine ReverseProxy> LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_http_module modules/mod_proxy_http.so <IfDefine UseCache> @@ -2196,8 +2129,7 @@ test retourne "vrai" au d LoadModule cache_disk_module modules/mod_cache_disk.so </IfDefine> </IfDefine> -</IfDefine> -+</IfDefine>Exemples :
--Include /usr/local/apache2/conf/ssl.conf -Include /usr/local/apache2/conf/vhosts/*.conf -+Include /usr/local/apache2/conf/ssl.conf +Include /usr/local/apache2/conf/vhosts/*.confou encore, avec des chemins relatifs au répertoire défini par la directive
-ServerRoot:-Include conf/ssl.conf -Include conf/vhosts/*.conf -+Include conf/ssl.conf +Include conf/vhosts/*.confOn peut aussi insérer des caractères génériques dans la partie @@ -2457,11 +2385,9 @@ certaines m
-DELETE, en laissant les autres méthodes sans protection :-<Limit POST PUT DELETE> +<Limit POST PUT DELETE> Require valid-user -</Limit> -+</Limit>La liste des noms de méthodes peut contenir une ou plusieurs @@ -2497,14 +2423,12 @@ certaines m
-POST, et la directiveRequire group editorssera ignorée dans tous les cas :-<LimitExcept GET> +<LimitExcept GET> Require valid-user </LimitExcept> <Limit POST> Require group editors -</Limit> -+</Limit>Par exemple :
--<LimitExcept POST GET> +@@ -2846,22 +2768,18 @@ sp directives contenues dans la section s'appliqueront à /private1, /private1/ et /private1/file.txt, mais pas à /private1other. -<LimitExcept POST GET> Require valid-user -</LimitExcept> -+</LimitExcept>-<Location /private1> +<Location /private1> # ... -</Location> -+</Location>De même, dans l'exemple ci-dessous, où l'on utilise un slash de fin, les directives contenues dans la section s'appliqueront à /private2/ et à /private2/file.txt, mais pas à /private2other.
--<Location /private2/> +<Location /private2/> # ... -</Location> -+</Location>Quand utiliser la section
@@ -2892,11 +2810,9 @@ sp rationnelles, moyennant l'addition d'un caractère<Location>~. Par exemple : --<Location ~ "/(extra|special)/data"> +<Location ~ "/(extra|special)/data"> #... -</Location> -+</Location>concernerait les URLs contenant les sous-chaîne @@ -2914,12 +2830,10 @@ sp appartenant au domaine
-example.com, vous pouvez utiliser :-<Location /status> +<Location /status> SetHandler server-status Require host example.com -</Location> -+</Location>Note à propos du slash (/)
@@ -2971,11 +2885,9 @@ correspondant spécifier les URLs concernées est une expression rationnelle au lieu d'une simple chaîne de caractères. Par exemple : --<LocationMatch "/(extra|special)/data"> +<LocationMatch "/(extra|special)/data"> # ... -</LocationMatch> -+</LocationMatch>correspondrait à toute URL contenant les sous-chaînes @@ -2991,11 +2903,9 @@ correspondant nommées) sont ignorées. Vous devez utiliser à la place des groupes nommés.
--<LocationMatch ^/combined/(?<sitename>[^/]+)> +<LocationMatch ^/combined/(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</LocationMatch> -+</LocationMatch>Voir aussi
@@ -3192,22 +3102,18 @@ Apache identificateur, avec ou sans le suffixe_module. Les trois spécifications suivantes sont donc équivalentes : --LogLevel info ssl:warn +LogLevel info ssl:warn LogLevel info mod_ssl.c:warn -LogLevel info ssl_module:warn -+LogLevel info ssl_module:warnIl est aussi possible d'attribuer un niveau de journalisation par répertoire :
--LogLevel info +LogLevel info <Directory "/usr/local/apache/htdocs/app"> LogLevel debug -</Directory> -+</Directory>@@ -3263,10 +3169,8 @@ Apache.Exemples:
-- LogLevelOverride 192.0.2.0/24 ssl:trace6 - LogLevelOverride 192.0.2.7 ssl:trace8 -+LogLevelOverride 192.0.2.0/24 ssl:trace6 + LogLevelOverride 192.0.2.7 ssl:trace8@@ -3654,10 +3558,8 @@ verrou pour tous les mutex ou seulement les mutex sp mutex par défaut pour tous les autres mutex deviendra@@ -3824,15 +3726,13 @@ particuliersysvsem. --Mutex sysvsem default -Mutex fcntl:/var/httpd/locks mpm-accept -+Mutex sysvsem default +Mutex fcntl:/var/httpd/locks mpm-acceptPar exemple, sans aucun symbole
-+et-:-<Directory "/web/docs"> +<Directory "/web/docs"> Options Indexes FollowSymLinks </Directory> <Directory "/web/docs/spec"> Options Includes -</Directory> -+</Directory>ici, seule l'option
-Includessera prise en compte @@ -3840,15 +3740,13 @@ particulier seconde directiveOptionsutilise les symboles+et-:-<Directory "/web/docs"> +<Directory "/web/docs"> Options Indexes FollowSymLinks </Directory> <Directory "/web/docs/spec"> Options +Includes -Indexes -</Directory> -+</Directory>alors, les options
-FollowSymLinkset @@ -4196,15 +4094,13 @@ serveurs virtuels nom. La directiveServerAliaspeut contenir des caractères génériques, si nécessaire.-<VirtualHost *:80> +<VirtualHost *:80> ServerName server.example.com ServerAlias server server2.example.com server2 ServerAlias *.example.com UseCanonicalName Off # ... -</VirtualHost> -+</VirtualHost>La recherche du serveur virtuel à base de nom correspondant au plus près à la requête s'effectue selon l'ordre d'apparition des @@ -4516,22 +4412,18 @@ gestionnaire particulier serveur/status est appelée, vous pouvez ajouter ceci dans
-httpd.conf:-<Location "/status"> +<Location "/status"> SetHandler server-status -</Location> -+</Location>Vous pouvez aussi utiliser cette directive pour associer un gestionnaire à des fichiers possèdant une extension de nom de fichier particulière. Par exemple :
--<FilesMatch \.php$> +<FilesMatch \.php$> SetHandler application/x-httpd-php -</FilesMatch> -+</FilesMatch>Vous pouvez écraser la définition antérieure d'une directive @@ -4596,11 +4488,9 @@ du serveur fichiers du répertoire
-/www/data/comme des inclusions côté serveur (SSI) :-<Directory "/www/data/"> +<Directory "/www/data/"> SetOutputFilter INCLUDES -</Directory> -+</Directory>Si la directive comporte plusieurs filtres, ils doivent être @@ -4872,15 +4762,13 @@ d'h -
-<VirtualHost 10.1.2.3:80> +@@ -4889,15 +4777,13 @@ d'h déterminé. Voici un exemple de serveur virtuel avec adresse IPv6 : -<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>-<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> +<VirtualHost [2001:db8::a00:20ff:fea7:ccea]:80> ServerAdmin webmaster@host.example.com DocumentRoot /www/docs/host.example.com ServerName host.example.com ErrorLog logs/host.example.com-error_log TransferLog logs/host.example.com-access_log -</VirtualHost> -+</VirtualHost>Chaque serveur virtuel doit correspondre à une adresse IP, un @@ -4978,8 +4864,7 @@ Apache. vérification de la définition de certaines options définies par l'utilisateur, et l'envoi d'un avertissement éventuel.
--# Exemple +diff --git a/docs/manual/mod/mod_access_compat.html.en b/docs/manual/mod/mod_access_compat.html.en index a8a0eea41d..93d1e07c30 100644 --- a/docs/manual/mod/mod_access_compat.html.en +++ b/docs/manual/mod/mod_access_compat.html.en @@ -123,10 +123,8 @@ server# Exemple # signale que ReverseProxy n'est pas défini <IfDefine !ReverseProxy> Warning "le mandataire inverse n'a pas été spécifié, veuillez corriger @@ -4988,8 +4873,7 @@ Apache. <IfDefine ReverseProxy> # définition de la configuration personnalisée du mandataire -</IfDefine> -+</IfDefine>A (partial) domain-name - -Allow from example.org -Allow from .net example.edu -+Allow from example.org +Allow from .net example.eduHosts whose names match, or end in, this string are allowed access. Only complete components are matched, so the above @@ -143,20 +141,16 @@ Allow from .net example.edu
A full IP address - -Allow from 10.1.2.3 -Allow from 192.168.1.104 192.168.1.205 -+Allow from 10.1.2.3 +Allow from 192.168.1.104 192.168.1.205An IP address of a host allowed access
A partial IP address - @@ -164,9 +158,7 @@ Allow from 10 172.20 192.168.2-Allow from 10.1 -Allow from 10 172.20 192.168.2 -+Allow from 10.1 +Allow from 10 172.20 192.168.2The first 1 to 3 bytes of an IP address, for subnet restriction.
A network/netmask pair - @@ -174,9 +166,7 @@ Allow from 10 172.20 192.168.2- Allow from 10.1.0.0/255.255.0.0 -+Allow from 10.1.0.0/255.255.0.0A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet restriction.
A network/nnn CIDR specification - @@ -188,10 +178,8 @@ Allow from 10 172.20 192.168.2- Allow from 10.1.0.0/16 -+Allow from 10.1.0.0/16Similar to the previous case, except the netmask consists of nnn high-order 1 bits.
IPv6 addresses and IPv6 subnets can be specified as shown below:
--Allow from 2001:db8::a00:20ff:fea7:ccea -Allow from 2001:db8::a00:20ff:fea7:ccea/10 -+Allow from 2001:db8::a00:20ff:fea7:ccea +Allow from 2001:db8::a00:20ff:fea7:ccea/10The third format of the arguments to the @@ -210,14 +198,12 @@ Allow from 2001:db8::a00:20ff:fea7:ccea/10
-User-Agent(browser type),Referer, or other HTTP request header fields.-SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in <Directory /docroot> Order Deny,Allow Deny from all Allow from env=let_me_in -</Directory> -+</Directory>In this case, browsers with a user-agent string beginning @@ -340,11 +326,9 @@ evaluated.
In the following example, all hosts in the example.org domain are allowed access; all other hosts are denied access.
--Order Deny,Allow +Order Deny,Allow Deny from all -Allow from example.org -+Allow from example.orgIn the next example, all hosts in the example.org domain are @@ -354,11 +338,9 @@ Allow from example.org state is to
-Denyaccess to the server.-Order Allow,Deny +Order Allow,Deny Allow from example.org -Deny from foo.example.org -+Deny from foo.example.orgOn the other hand, if the
-Orderin the @@ -377,11 +359,9 @@ Deny from foo.example.org directives because of its effect on the default access state. For example,-<Directory /www> +<Directory /www> Order Allow,Deny -</Directory> -+</Directory>will Deny all access to the
-/wwwdirectory @@ -437,11 +417,9 @@ user authentication people outside of your network provide a password, you could use a configuration similar to the following:-Require valid-user +Require valid-user Allow from 192.168.1 -Satisfy Any -+Satisfy Any@@ -449,16 +427,14 @@ Satisfy Any is to relax access restrictions for a subdirectory:
--<Directory /var/www/private> +<Directory /var/www/private> Require valid-user </Directory> <Directory /var/www/private/public> Allow from all Satisfy Any -</Directory> -+</Directory>In the above example, authentication will be required for the diff --git a/docs/manual/mod/mod_access_compat.html.fr b/docs/manual/mod/mod_access_compat.html.fr index 6fa9ca9fa8..9be74d2ff5 100644 --- a/docs/manual/mod/mod_access_compat.html.fr +++ b/docs/manual/mod/mod_access_compat.html.fr @@ -129,10 +129,8 @@ d'environnement
Un nom de domaine (partiel) - -Allow from example.org -Allow from .net example.edu -+Allow from example.org +Allow from .net example.eduLes hôtes dont les noms correspondent ou se terminent par la chaîne spécifiée ont l'autorisation d'accès. Seules les @@ -152,20 +150,16 @@ Allow from .net example.edu
Une adresse IP complète - -Allow from 10.1.2.3 -Allow from 192.168.1.104 192.168.1.205 -+Allow from 10.1.2.3 +Allow from 192.168.1.104 192.168.1.205L'adresse IP d'un hôte auquel on a accordé l'accès
Une adresse IP partielle - @@ -173,9 +167,7 @@ Allow from 10 172.20 192.168.2-Allow from 10.1 -Allow from 10 172.20 192.168.2 -+Allow from 10.1 +Allow from 10 172.20 192.168.2De un à trois des premiers octets d'une adresse IP, afin de restreindre l'accès à un sous-réseau.
Une paire réseau/masque de sous-réseau - - Allow from 10.1.0.0/255.255.0.0 -+Allow from 10.1.0.0/255.255.0.0Un réseau a.b.c.d, et un masque de sous-réseau w.x.y.z, pour une définition plus précise de la restriction d'accès imposée à un @@ -184,9 +176,7 @@ Allow from 10 172.20 192.168.2
Une spécification CIDR réseau/nnn - @@ -198,10 +188,8 @@ Allow from 10 172.20 192.168.2- Allow from 10.1.0.0/16 -+Allow from 10.1.0.0/16Identique au cas précédent, mis à part que le masque est constitué des nnn bits de poids fort.
On peut spécifier des adresses et sous-réseaux IPv6 de la manière suivante :
--Allow from 2001:db8::a00:20ff:fea7:ccea -Allow from 2001:db8::a00:20ff:fea7:ccea/10 -+Allow from 2001:db8::a00:20ff:fea7:ccea +Allow from 2001:db8::a00:20ff:fea7:ccea/10Le troisième format d'argument de la directive @@ -221,14 +209,12 @@ Allow from 2001:db8::a00:20ff:fea7:ccea/10 (type de navigateur) des clients, le
-Referer, ou d'autres champs d'en-tête de la requête HTTP.-SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in <Directory /docroot> Order Deny,Allow Deny from all Allow from env=let_me_in -</Directory> -+</Directory>Dans cet exemple, les navigateurs dont la chaîne user-agent @@ -357,11 +343,9 @@ les directives
-Allowet l'autorisation d'accès ; tous les autres voient leur accès refusé.-Order Deny,Allow +Order Deny,Allow Deny from all -Allow from example.org -+Allow from example.orgDans l'exemple suivant, tous les hôtes du domaine example.org ont @@ -371,11 +355,9 @@ Allow from example.org sur
-Deny, et consiste donc en un refus d'accès.-Order Allow,Deny +Order Allow,Deny Allow from example.org -Deny from foo.example.org -+Deny from foo.example.orgPar contre, si la valeur de la directive @@ -395,11 +377,9 @@ Deny from foo.example.org l'abscence de directives
-AllowetDenyassociées, à cause de son influence sur le statut par défaut. Par exemple,-<Directory /www> +<Directory /www> Order Allow,Deny -</Directory> -+</Directory>va interdire tout accès au répertoire
-/wwwà cause @@ -457,11 +437,9 @@ et l'authentification utilisateur que l'accès à cette zone nécessite un mot de passe pour les autres utilisateurs, vous pouvez utiliser une configuration du style :-Require valid-user +Require valid-user Allow from 192.168.1 -Satisfy Any -+Satisfy Any@@ -471,16 +449,14 @@ Satisfy Any répertoire parent :
--<Directory /var/www/private> +<Directory /var/www/private> Require valid-user </Directory> <Directory /var/www/private/public> Allow from all Satisfy Any -</Directory> -+</Directory>Dans l'exemple ci-dessus, l'accès au répertoire diff --git a/docs/manual/mod/mod_actions.html.en b/docs/manual/mod/mod_actions.html.en index fe638604b3..add7432655 100644 --- a/docs/manual/mod/mod_actions.html.en +++ b/docs/manual/mod/mod_actions.html.en @@ -75,21 +75,17 @@ content-type environment variables. The handler used for the particular request is passed using the
-REDIRECT_HANDLERvariable.Example: MIME type
-# Requests for files of a particular MIME content type: -Action image/gif /cgi-bin/images.cgi -+Example: MIME type
# Requests for files of a particular MIME content type: +Action image/gif /cgi-bin/images.cgiIn this example, requests for files with a MIME content type of
-image/gifwill be handled by the specified cgi script/cgi-bin/images.cgi.diff --git a/docs/manual/mod/mod_actions.html.fr b/docs/manual/mod/mod_actions.html.fr index b09e6083ed..8fab4a1ec1 100644 --- a/docs/manual/mod/mod_actions.html.fr +++ b/docs/manual/mod/mod_actions.html.fr @@ -82,21 +82,17 @@ contenu particulier requête particulière est transmis à l'aide de la variableExample: File extension
-# Files of a particular file extension +Example: File extension
# Files of a particular file extension AddHandler my-file-type .xyz -Action my-file-type /cgi-bin/program.cgi -+Action my-file-type /cgi-bin/program.cgiIn this example, requests for files with a file extension of
-.xyzare handled by the specified cgi script @@ -100,12 +96,10 @@ Action my-file-type /cgi-bin/program.cgi if you want to use theActiondirective in virtual locations.-<Location /news> +<Location /news> SetHandler news-handler Action news-handler /cgi-bin/news.cgi virtual -</Location> -+</Location>See also
@@ -146,13 +140,11 @@ method. (e.g., foo.html?hi). Otherwise, the request will proceed normally. --# All GET requests go here +# All GET requests go here Script GET /cgi-bin/search # A CGI PUT handler -Script PUT /~bob/put.cgi -+Script PUT /~bob/put.cgiREDIRECT_HANDLER. -@@ -67,11 +65,9 @@ RFC given in upper case. The GET and HEAD methods are treated as equivalent. TheExemple : type MIME
-# Requests for files of a particular MIME content type: -Action image/gif /cgi-bin/images.cgi -+Exemple : type MIME
# Requests for files of a particular MIME content type: +Action image/gif /cgi-bin/images.cgiDans cet exemple, les requêtes pour des fichiers possédant le type de contenu MIME
-image/gifseront traitées par le script CGI/cgi-bin/images.cgi.diff --git a/docs/manual/mod/mod_alias.html.en b/docs/manual/mod/mod_alias.html.en index 51cb7eea69..eff1f68eac 100644 --- a/docs/manual/mod/mod_alias.html.en +++ b/docs/manual/mod/mod_alias.html.en @@ -97,10 +97,8 @@ all the directives to have an effect. For example, the following configuration will work as expected: -Example: File extension
-# Files of a particular file extension +Example: File extension
# Files of a particular file extension AddHandler my-file-type .xyz -Action my-file-type /cgi-bin/program.cgi -+Action my-file-type /cgi-bin/program.cgiDans cet exemple, les requêtes pour des fichiers possédant l'extension
-.xyzseront traitées par @@ -108,12 +104,10 @@ Action my-file-type /cgi-bin/program.cgi directiveActionpour des localisations virtuelles.-<Location /news> +<Location /news> SetHandler news-handler Action news-handler /cgi-bin/news.cgi virtual -</Location> -+</Location>Voir aussi
@@ -156,13 +150,11 @@ particuli foo.html?hi). Dans le cas contraire, la requête sera traitée normalement. --# All GET requests go here +# All GET requests go here Script GET /cgi-bin/search # A CGI PUT handler -Script PUT /~bob/put.cgi -+Script PUT /~bob/put.cgi-Alias /foo/bar /baz -Alias /foo /gaq -+Alias /foo/bar /baz +Alias /foo /gaqBut if the above two directives were reversed in order, the @@ -128,9 +126,7 @@ Alias /foo /gaq URL-path is case-sensitive, even on case-insensitive file systems.
-- Alias /image /ftp/pub/image -+Alias /image /ftp/pub/imageA request for
-http://example.com/image/foo.gifwould cause @@ -143,9 +139,7 @@ Alias /foo /gaq URL-path then the server will require a trailing / in order to expand the alias. That is, if you use- Alias /icons/ /usr/local/apache/icons/ -+Alias /icons/ /usr/local/apache/icons/then the url
-/iconswill not be aliased, as it lacks @@ -165,12 +159,10 @@ Alias /foo /gaq directory outside of yourDocumentRoot, you may need to explicitly permit access to the target directory.-Alias /image /ftp/pub/image +Alias /image /ftp/pub/image <Directory /ftp/pub/image> Require all granted -</Directory> -+</Directory>Any number slashes in the URL-path parameter @@ -198,9 +190,7 @@ expressions example, to activate the
-/iconsdirectory, one might use:- AliasMatch ^/icons(.*) /usr/local/apache/icons$1 -+AliasMatch ^/icons(.*) /usr/local/apache/icons$1The full range of regular expression @@ -208,9 +198,7 @@ expressions it is possible to construct an alias with case-insensitive matching of the URL-path:
-- AliasMatch (?i)^/image(.*) /ftp/pub/image$1 -+AliasMatch (?i)^/image(.*) /ftp/pub/image$1One subtle difference @@ -234,24 +222,18 @@ expressions
For example, suppose you want to replace this with AliasMatch:
-- Alias /image/ /ftp/pub/image/ -+Alias /image/ /ftp/pub/image/This is NOT equivalent - don't do this! This will send all requests that have /image/ anywhere in them to /ftp/pub/image/:
-- AliasMatch /image/ /ftp/pub/image/ -+AliasMatch /image/ /ftp/pub/image/This is what you need to get the same effect:
-- AliasMatch ^/image/(.*)$ /ftp/pub/image/$1 -+AliasMatch ^/image/(.*)$ /ftp/pub/image/$1Of course, there's no point in @@ -261,10 +243,8 @@ expressions you do more complicated things. For example, you could serve different kinds of files from different directories:
-- AliasMatch ^/image/(.*)\.jpg$ /files/jpg.images/$1.jpg+
- AliasMatch ^/image/(.*)\.gif$ /files/gif.images/$1.gif -AliasMatch ^/image/(.*)\.jpg$ /files/jpg.images/$1.jpg
+ AliasMatch ^/image/(.*)\.gif$ /files/gif.images/$1.gifMultiple leading slashes in the requested URL are discarded @@ -302,13 +282,11 @@ a different URL URL. Additional path information beyond the matched URL-Path will be appended to the target URL.
--# Redirect to a URL on a different host +# Redirect to a URL on a different host Redirect /service http://foo2.example.com/service # Redirect to a URL on the same host -Redirect /one /two -+Redirect /one /twoIf the client requests
-http://example.com/service/foo.txt, @@ -366,10 +344,8 @@ Redirect /one /two HTTP status code, known to the Apache HTTP Server (see the functionsend_error_responsein http_protocol.c).-Redirect permanent /one http://example.com/two -Redirect 303 /three http://example.com/other -+Redirect permanent /one http://example.com/two +Redirect 303 /three http://example.com/other@@ -395,9 +371,7 @@ of the current URL example, to redirect all GIF files to like-named JPEG files on another server, one might use: -- RedirectMatch (.*)\.gif$ http://other.example.com$1.jpg -+RedirectMatch (.*)\.gif$ http://other.example.com$1.jpgThe considerations related to the difference between @@ -463,29 +437,23 @@ target as a CGI script to scripts beginning with the second argument, which is a full pathname in the local filesystem.
-- ScriptAlias /cgi-bin/ /web/cgi-bin/ -+ScriptAlias /cgi-bin/ /web/cgi-bin/A request for
-http://example.com/cgi-bin/foowould cause the server to run the script/web/cgi-bin/foo. This configuration is essentially equivalent to:-Alias /cgi-bin/ /web/cgi-bin/ +Alias /cgi-bin/ /web/cgi-bin/ <Location /cgi-bin > SetHandler cgi-script Options +ExecCGI -</Location> -+</Location>-
ScriptAliascan also be used in conjunction with a script or handler you have. For example:- ScriptAlias /cgi-bin/ /web/cgi-handler.pl -+ScriptAlias /cgi-bin/ /web/cgi-handler.plIn this scenario all files requested in
/cgi-bin/will be @@ -502,12 +470,10 @@ Alias /cgi-bin/ /web/cgi-bin/ choose to place your CGI scripts in a directory already accessible from the web, do not useScriptAlias. Instead, use<Directory>,SetHandler, andOptionsas in: --<Directory /usr/local/apache2/htdocs/cgi-bin > +This is necessary since multiple URL-paths can map to the same filesystem location, potentially bypassing the @@ -541,9 +507,7 @@ and designates the target as a CGI script example, to activate the standard<Directory /usr/local/apache2/htdocs/cgi-bin > SetHandler cgi-script Options ExecCGI -</Directory> -+</Directory>/cgi-bin, one might use: -- ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -+ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1As for AliasMatch, the full range of regular @@ -551,9 +515,7 @@ and designates the target as a CGI script For example, it is possible to construct an alias with case-insensitive matching of the URL-path:
-- ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -+ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1The considerations related to the difference between diff --git a/docs/manual/mod/mod_alias.html.fr b/docs/manual/mod/mod_alias.html.fr index fd71440a07..2610e0cb56 100644 --- a/docs/manual/mod/mod_alias.html.fr +++ b/docs/manual/mod/mod_alias.html.fr @@ -103,10 +103,8 @@ syst au moins précis afin que toutes les directives puissent éventuellement s'appliquer, comme dans l'exemple suivant :
--Alias /foo/bar /baz -Alias /foo /gaq -+Alias /foo/bar /baz +Alias /foo /gaqSi l'ordre des directives était inversé, la directive
-Aliasayant pour argument @@ -137,9 +135,7 @@ de fichiers est sensible à la casse, même sur les systèmes de fichiers insensibles à la casse.- Alias /image /ftp/pub/image -+Alias /image /ftp/pub/imageUne requête pour
-http://example.com/image/foo.giffera @@ -155,9 +151,7 @@ de fichiers URL, vous devrez aussi ajouter un slash de fin au chemin de la requête. Autrement dit, si vous définissez- Alias /icons/ /usr/local/apache/icons/ -+Alias /icons/ /usr/local/apache/icons/l'alias précédent ne s'appliquera pas à l'url @@ -179,12 +173,10 @@ de fichiers
-DocumentRoot, vous devrez probablement permettre explicitement l'accès à ce répertoire.-Alias /image /ftp/pub/image +Alias /image /ftp/pub/image <Directory /ftp/pub/image> Require all granted -</Directory> -+</Directory>Le nombre de slashes dans le paramètre chemin URL doit @@ -212,9 +204,7 @@ en faisant intervenir les expressions rationnelles Par exemple, pour activer le répertoire
-/icons, on peut utiliser :- AliasMatch ^/icons(.*) /usr/local/apache/icons$1 -+AliasMatch ^/icons(.*) /usr/local/apache/icons$1Toute la puissance des expressions @@ -222,9 +212,7 @@ en faisant intervenir les expressions rationnelles il est possible de construire un alias avec un modèle de chemin URL insensible à la casse :
-- AliasMatch (?i)^/image(.*) /ftp/pub/image$1 -+AliasMatch (?i)^/image(.*) /ftp/pub/image$1Il existe une différence subtile entre
AliasetAliasMatch:Aliascopie automatiquement toute @@ -244,26 +232,20 @@ en faisant intervenir les expressions rationnellesPar exemple, supposons que nous voulions reformuler cet alias avec AliasMatch :
-- Alias /image/ /ftp/pub/image/ -+Alias /image/ /ftp/pub/image/Le simple remplacement d'Alias par AliasMatch ne produira pas le même résultat. Ainsi, ce qui suit va rediriger toutes les requêtes qui contiennent /image/ vers /ftp/pub/image/ :
-- AliasMatch /image/ /ftp/pub/image/ -+AliasMatch /image/ /ftp/pub/image/Voici la directive AliasMatch qui produira le même résultat que la directive Alias ci-dessus :
-- AliasMatch ^/image/(.*)$ /ftp/pub/image/$1 -+AliasMatch ^/image/(.*)$ /ftp/pub/image/$1Bien entendu, il n'y a aucune raison d'utiliser
-AliasMatchdans le cas oùAliassuffit.AliasMatchvous permet d'effectuer @@ -271,10 +253,8 @@ en faisant intervenir les expressions rationnelles servir différentes sortes de fichiers à partir de répertoires différents :- AliasMatch ^/image/(.*)\.jpg$ /fichiers/jpg.images/$1.jpg+
- AliasMatch ^/image/(.*)\.gif$ /fichiers/gif.images/$1.gif -AliasMatch ^/image/(.*)\.jpg$ /fichiers/jpg.images/$1.jpg
+ AliasMatch ^/image/(.*)\.gif$ /fichiers/gif.images/$1.gifLes éventuels slashes de tête multiples seront supprimés par le @@ -315,13 +295,11 @@ d'effectuer une autre requ élément de chemin supplémentaire situé en aval du chemin URL sera ajouté à l'URL cible.
--# Redirige vers une URL sur un serveur différent +# Redirige vers une URL sur un serveur différent Redirect /service http://foo2.example.com/service # Redirige vers une URL sur le même serveur -Redirect /one /two -+Redirect /one /twoSi le client effectue une requête pour l'URL @@ -385,10 +363,8 @@ Redirect /one /two fonction
-send_error_responsedans http_protocol.c).-Redirect permanent /one http://example.com/two -Redirect 303 /three http://example.com/other -+Redirect permanent /one http://example.com/two +Redirect 303 /three http://example.com/other@@ -416,9 +392,7 @@ courante les fichiers GIF vers les fichiers JPEG de même nom sur un autre serveur, on peut utiliser : -- RedirectMatch (.*)\.gif$ http://autre.example.com$1.jpg -+RedirectMatch (.*)\.gif$ http://autre.example.com$1.jpgLes remarques à propos de la différence entre
-AliasetAliasMatchs'appliquent aussi à la @@ -483,30 +457,24 @@ et d second argument, qui est un chemin complet dans le système de fichiers local.- ScriptAlias /cgi-bin/ /web/cgi-bin/ -+ScriptAlias /cgi-bin/ /web/cgi-bin/Une requête pour
-http://example.com/cgi-bin/fooferait exécuter par le serveur le script/web/cgi-bin/foo. Cette configuration est sensiblement équivalente à :-Alias /cgi-bin/ /web/cgi-bin/ +Alias /cgi-bin/ /web/cgi-bin/ <Location /cgi-bin > SetHandler cgi-script Options +ExecCGI -</Location> -+</Location>Vous pouvez aussi utiliser
-ScriptAliasavec un script ou gestionnaire de votre cru. Par exemple :- ScriptAlias /cgi-bin/ /web/cgi-handler.pl -+ScriptAlias /cgi-bin/ /web/cgi-handler.plDans ce scénario, tous les fichiers faisant l'objet d'une requête @@ -524,12 +492,10 @@ Alias /cgi-bin/ /web/cgi-bin/ Si vous choisissez de placer vos scripts CGI dans un répertoire accessible depuis le web, n'utilisez pas
ScriptAlias. Utilisez plutôt<Directory>,SetHandler, etOptionscomme dans l'exemple suivant : --<Directory /usr/local/apache2/htdocs/cgi-bin > +Ceci est nécessaire car plusieurs chemins URL peuvent correspondre à la même zone du système de fichiers, court-circuitant @@ -564,18 +530,14 @@ comme un script CGI comme nom de fichier. Par exemple, pour activer le répertoire standard<Directory /usr/local/apache2/htdocs/cgi-bin > SetHandler cgi-script Options ExecCGI -</Directory> -+</Directory>/cgi-bin, on peut utiliser : -- ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -+ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1Comme dans le cas d'AliasMatch, toute la puissance des expressions rationnelles peut être mise à contribution. Par exemple, il est possible de construire un alias avec une comparaison du modèle du chemin URL insensible à la casse :
-- ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1 -+ScriptAliasMatch (?i)^/cgi-bin(.*) /usr/local/apache/cgi-bin$1Les remarques à propos de la différence entre
AliasetAliasMatchs'appliquent aussi à la diff --git a/docs/manual/mod/mod_allowhandlers.html.en b/docs/manual/mod/mod_allowhandlers.html.en index 8ff7e666c0..9e9b4d59ce 100644 --- a/docs/manual/mod/mod_allowhandlers.html.en +++ b/docs/manual/mod/mod_allowhandlers.html.en @@ -35,11 +35,9 @@This module makes it easy to restrict which handlers may be used for a request. A possible configuration would be:
--<Location /> +<Location /> AllowHandlers not server-info server-status balancer-manager ldap-status -</Location> -+</Location>It also registers a handler named
-forbiddenthat simply @@ -75,12 +73,10 @@ set. The special vallueallcan be used to allow all handlers again in a later config section, even if some headers were denied earlier in the configuration merge order:-<Location /server-status> +diff --git a/docs/manual/mod/mod_allowmethods.html.en b/docs/manual/mod/mod_allowmethods.html.en index 0a31732af2..255ee29cf1 100644 --- a/docs/manual/mod/mod_allowmethods.html.en +++ b/docs/manual/mod/mod_allowmethods.html.en @@ -36,11 +36,9 @@<Location /server-status> AllowHandlers all SetHandler server-status -</Location> -+</Location>This module makes it easy to restrict what HTTP methods can used on an server. The most common configuration would be:
--<Location /> +<Location /> AllowMethods GET POST OPTIONS -</Location> -+</Location>resetkeyword can be used turn offmod_allowmethodsin a deeper nested context: --<Location /svn> +<Location /svn> AllowMethods reset -</Location> -+</Location>@@ -70,11 +68,9 @@ HEAD sont traitCaution
diff --git a/docs/manual/mod/mod_allowmethods.html.fr b/docs/manual/mod/mod_allowmethods.html.fr index b6ca2274c5..d9d5ed820e 100644 --- a/docs/manual/mod/mod_allowmethods.html.fr +++ b/docs/manual/mod/mod_allowmethods.html.fr @@ -37,11 +37,9 @@ acceptées par le serveur. La configuration la plus courante est du style : --<Location /> +<Location /> AllowMethods GET POST OPTIONS -</Location> -+</Location>mod_allowmethodsdans les niveaux inférieurs d'imbrication : --<Location /svn> +<Location /svn> AllowMethods reset -</Location> -+</Location>Avertissement
diff --git a/docs/manual/mod/mod_auth_basic.html.en b/docs/manual/mod/mod_auth_basic.html.en index 276169c4ab..b9a3dd3edd 100644 --- a/docs/manual/mod/mod_auth_basic.html.en +++ b/docs/manual/mod/mod_auth_basic.html.en @@ -110,11 +110,9 @@ username and passwordIn this example, we pass a fixed username and password to a backend server.
-Fixed Example
-<Location /demo> +Fixed Example
<Location /demo> AuthBasicFake demo demopass -</Location> -+</Location>In this example, we pass the email address extracted from a client @@ -123,11 +121,9 @@ username and password directive. Like the FakeBasicAuth option, the password is set to the fixed string "password".
-Certificate Example
-<Location /secure> +Certificate Example
<Location /secure> AuthBasicFake %{SSL_CLIENT_S_DN_Email} -</Location> -+</Location>Extending the above example, we generate a password by hashing the @@ -135,18 +131,14 @@ username and password backend server. This can be used to gate into legacy systems that do not support client certificates.
-Password Example
-<Location /secure> +-Password Example
<Location /secure> AuthBasicFake %{SSL_CLIENT_S_DN_Email} %{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}} -</Location> -+</Location>Exclusion Example
-<Location /public> +@@ -168,16 +160,14 @@ username and password The defaultExclusion Example
<Location /public> AuthBasicFake off -</Location> -+</Location>fileprovider is implemented by themod_authn_filemodule. Make sure that the chosen provider module is present in the server. -Example
-<Location /secure> +Example
<Location /secure> AuthType basic AuthName "private area" AuthBasicProvider dbm AuthDBMType SDBM AuthDBMUserFile /www/etc/dbmpasswd Require valid-user -</Location> -+</Location>Providers are queried in order until a provider finds a match for the requested username, at which point this sole provider will diff --git a/docs/manual/mod/mod_auth_basic.html.fr b/docs/manual/mod/mod_auth_basic.html.fr index a006b4443d..1c89b67b56 100644 --- a/docs/manual/mod/mod_auth_basic.html.fr +++ b/docs/manual/mod/mod_auth_basic.html.fr @@ -117,11 +117,9 @@ d'utilisateur et mot de passe fournis prédéfinis sont transmis à un serveur d'arrière-plan :
Exemple de transmission d'un nom d'utilisateur et - d'un mot de passe prédéfinis
-<Location /demo> + d'un mot de passe prédéfinis<Location /demo> AuthBasicFake demo demopass -</Location> -+</Location>Dans l'exemple suivant, l'adresse email extraite d'un certificat @@ -130,11 +128,9 @@ d'utilisateur et mot de passe fournis FakeBasicAuth, le mot de passe se voit attribué le contenu fixe de la chaîne "password".
-Exemple d'utilisation avec un certificat
-<Location /secure> +Exemple d'utilisation avec un certificat
<Location /secure> AuthBasicFake %{SSL_CLIENT_S_DN_Email} -</Location> -+</Location>Pour compléter l'exemple précédent, il est possible de générer la @@ -145,18 +141,14 @@ d'utilisateur et mot de passe fournis certificats clients.
-Exemple de génération de mot de passe par hashage de - l'adresse email
-<Location /secure> + l'adresse email<Location /secure> AuthBasicFake %{SSL_CLIENT_S_DN_Email} %{sha1:passphrase-%{SSL_CLIENT_S_DN_Email}} -</Location> -+</Location>Désactivation de l'authentification simulée
-<Location /public> +@@ -182,16 +174,14 @@ cette zone du site web implémentant le fournisseur choisi soit bien présent dans le serveur. -Désactivation de l'authentification simulée
<Location /public> AuthBasicFake off -</Location> -+</Location>Exemple
-<Location /secure> +Exemple
<Location /secure> AuthType basic AuthName "private area" AuthBasicProvider dbm AuthDBMType SDBM AuthDBMUserFile /www/etc/dbmpasswd Require valid-user -</Location> -+</Location>Les fournisseurs sont sollicités dans l'ordre jusqu'à ce que l'un d'entre eux trouve une correspondance pour le nom d'utilisateur de diff --git a/docs/manual/mod/mod_auth_digest.html.en b/docs/manual/mod/mod_auth_digest.html.en index fe8e8859e7..4c55c5c5dd 100644 --- a/docs/manual/mod/mod_auth_digest.html.en +++ b/docs/manual/mod/mod_auth_digest.html.en @@ -83,8 +83,7 @@
Appropriate user (text) files can be created using the
-htdigesttool.Example:
-<Location /private/> +Example:
<Location /private/> AuthType Digest AuthName "private area" AuthDigestDomain /private/ http://mirror.my.dom/private2/ @@ -92,8 +91,7 @@ AuthDigestProvider file AuthUserFile /web/auth/.digest_pw Require valid-user -</Location> -+</Location>diff --git a/docs/manual/mod/mod_auth_digest.html.fr b/docs/manual/mod/mod_auth_digest.html.fr index 4372e074d2..5da8beed54 100644 --- a/docs/manual/mod/mod_auth_digest.html.fr +++ b/docs/manual/mod/mod_auth_digest.html.fr @@ -85,8 +85,7 @@ condensNote
@@ -295,11 +293,9 @@ of clients express your value as KBytes or MBytes. For example, the following directives are all equivalent: --AuthDigestShmemSize 1048576 +AuthDigestShmemSize 1048576 AuthDigestShmemSize 1024K -AuthDigestShmemSize 1M -+AuthDigestShmemSize 1MOn peut créer les fichiers utilisateur appropriés (au format texte) à l'aide de l'outil
-htdigest.Exemple :
-<Location /private/> +Exemple :
<Location /private/> AuthType Digest AuthName "private area" AuthDigestDomain /private/ http://mirror.my.dom/private2/ @@ -94,8 +93,7 @@ condens AuthDigestProvider file AuthUserFile /web/auth/.digest_pw Require valid-user -</Location> -+</Location>diff --git a/docs/manual/mod/mod_auth_form.html.en b/docs/manual/mod/mod_auth_form.html.en index c81d8e25ab..e6ffc034d2 100644 --- a/docs/manual/mod/mod_auth_form.html.en +++ b/docs/manual/mod/mod_auth_form.html.en @@ -107,16 +107,14 @@ a file usingNote
@@ -315,11 +313,9 @@ les informations MégaOctets. Par exemple, les directives qui suivent sont toutes équivalentes : --AuthDigestShmemSize 1048576 +AuthDigestShmemSize 1048576 AuthDigestShmemSize 1024K -AuthDigestShmemSize 1M -+AuthDigestShmemSize 1Mmod_authn_file. If authentication is unsuccessful, the user will be redirected to the form login page. -Basic example
-AuthFormProvider file +Basic example
AuthFormProvider file AuthUserFile conf/passwd AuthType form AuthName realm AuthFormLoginRequiredLocation http://example.com/login.html Session On SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretThe directive
-AuthTypewill enable @@ -150,21 +148,18 @@ SessionCryptoPassphrase secret directive. Typically this login page will contain an HTML form, asking the user to provide their usename and password.Example login form
-<form method="POST" action="/dologin.html"> +Example login form
<form method="POST" action="/dologin.html"> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" /> -</form> -+</form>The part that does the actual login is handled by the form-login-handler. The action of the form should point at this handler, which is configured within Apache httpd as follows:
-Form login handler example
-<Location /dologin.html> +Form login handler example
<Location /dologin.html> SetHandler form-login-handler AuthFormLoginRequiredLocation http://example.com/login.html AuthFormLoginSuccessLocation http://example.com/success.html @@ -175,8 +170,7 @@ SessionCryptoPassphrase secret Session On SessionCookieName session path=/ SessionCryptoPassphrase secret -</Location> -+</Location>The URLs specified by the @@ -189,14 +183,12 @@ SessionCryptoPassphrase secret form, as in the example below. As a result, the same form-login-handler can be reused for different areas of a website.
-@@ -228,8 +220,7 @@ SessionCryptoPassphrase secret returned by the HTTP_UNAUTHORIZED status code with a custom error document containing the login form, as follows: -Example login form with location
-<form method="POST" action="/dologin.html"> +Example login form with location
<form method="POST" action="/dologin.html"> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" /> <input type="hidden" name="httpd_location" value="http://example.com/success.html" /> -</form> -+</form>Basic inline example
-AuthFormProvider file +Basic inline example
AuthFormProvider file ErrorDocument 401 /login.shtml AuthUserFile conf/passwd AuthType form @@ -237,8 +228,7 @@ AuthName realm AuthFormLoginRequiredLocation http://example.com/login.html Session On SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretThe error document page should contain a login form with an empty action property, @@ -246,13 +236,11 @@ SessionCryptoPassphrase secret the original protected URL, without the page having to know what that URL is.
-Example inline login form
-<form method="POST" action=""> +Example inline login form
<form method="POST" action=""> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" /> -</form> -+</form>When the end user has filled in their login details, the form will make @@ -281,16 +269,14 @@ SessionCryptoPassphrase secret
To enable body preservation, add three additional fields to the login form as per the example below.
-Example with body preservation
-<form method="POST" action=""> +Example with body preservation
<form method="POST" action=""> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" />+</form>
<input type="hidden" name="httpd_method" value="POST" /> <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" /> <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />
-</form> -How the method, mimetype and body of the original request are embedded within the @@ -304,11 +290,9 @@ SessionCryptoPassphrase secret
Another option is to render the login form using a CGI script or other dynamic technology.
-@@ -326,14 +310,12 @@ SessionCryptoPassphrase secret logout. This URL might explain to the user that they have been logged out, and give the user the option to log in again. -CGI example
- AuthFormProvider file +CGI example
AuthFormProvider file ErrorDocument 401 /cgi-bin/login.cgi - ... -+ ...Basic logout example
-SetHandler form-logout-handler +Basic logout example
SetHandler form-logout-handler AuthName realm AuthFormLogoutLocation http://example.com/loggedout.html Session On SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretNote that logging a user out does not delete the session; it merely removes @@ -344,14 +326,12 @@ SessionCryptoPassphrase secret value, like 1 (setting the directive to zero would mean no session age limit).
-@@ -530,14 +510,12 @@ lower level modulesBasic session expiry example
-SetHandler form-logout-handler +Basic session expiry example
SetHandler form-logout-handler AuthFormLogoutLocation http://example.com/loggedout.html Session On SessionMaxAge 1 SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretWhen a URI is accessed that is served by the handler
-form-logout-handler, the page specified by this directive will be shown to the end user. For example:Example
-<Location /logout> +Example
<Location /logout> SetHandler form-logout-handler AuthFormLogoutLocation http://example.com/loggedout.html Session on #... -</Location> -+</Location>An attempt to access the URI /logout/ will result in the user being logged @@ -627,8 +605,7 @@ lower level modules by the
-mod_authn_filemodule. Make sure that the chosen provider module is present in the server.Example
-<Location /secure> +Example
<Location /secure> AuthType form AuthName "private area" AuthFormProvider dbm @@ -636,8 +613,7 @@ lower level modules AuthDBMUserFile /www/etc/dbmpasswd Require valid-user #... -</Location> -+</Location>Providers are implemented by
-mod_authn_dbm, diff --git a/docs/manual/mod/mod_auth_form.html.fr b/docs/manual/mod/mod_auth_form.html.fr index e04d354813..db0a55f153 100644 --- a/docs/manual/mod/mod_auth_form.html.fr +++ b/docs/manual/mod/mod_auth_form.html.fr @@ -117,16 +117,14 @@ l'authentification l'utilisateur sera redirigé vers la page du formulaire de connexion.Exemple simple
-AuthFormProvider file +Exemple simple
AuthFormProvider file AuthUserFile conf/passwd AuthType form AuthName realm AuthFormLoginRequiredLocation http://example.com/login.html Session On SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretL'authentification
-mod_auth_formest activée @@ -164,13 +162,11 @@ SessionCryptoPassphrase secret En général, la page de connexion contiendra un formulaire HTML demandant à l'utilisateur de fournir un nom et un mot de passe.Exemple de formulaire de connexion
-<form method="POST" action="/dologin.html"> +Exemple de formulaire de connexion
<form method="POST" action="/dologin.html"> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" /> -</form> -+</form>La partie où s'effectue la connexion proprement dite est @@ -179,8 +175,7 @@ SessionCryptoPassphrase secret que l'on configure dans Apache httpd comme suit :
Exemple de configuration du gestionnaire de - formulaire de connexion
-<Location /dologin.html> + formulaire de connexion<Location /dologin.html> SetHandler form-login-handler AuthFormLoginRequiredLocation http://example.com/login.html AuthFormLoginSuccessLocation http://example.com/success.html @@ -191,8 +186,7 @@ SessionCryptoPassphrase secret Session On SessionCookieName session path=/ SessionCryptoPassphrase secret -</Location> -+</Location>L'URL spécifiée par la directive @@ -210,14 +204,12 @@ SessionCryptoPassphrase secret form-login-handler pourra être utilisé pour différentes zones du site web.
-@@ -256,8 +248,7 @@ SessionCryptoPassphrase secret HTTP_UNAUTHORIZED par un message d'erreur personnalisé contenant le formulaire de connexion comme suit : -Exemple de formulaire d'authentification multizone
-<form method="POST" action="/dologin.html"> +Exemple de formulaire d'authentification multizone
<form method="POST" action="/dologin.html"> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" /> <input type="hidden" name="httpd_location" value="http://example.com/success.html" /> -</form> -+</form>@@ -469,14 +451,12 @@ d'autorisation. de directives telles queExemple simple d'authentification à la volée
-AuthFormProvider file +Exemple simple d'authentification à la volée
AuthFormProvider file ErrorDocument 401 /login.shtml AuthUserFile conf/passwd AuthType form @@ -265,8 +256,7 @@ AuthName realm AuthFormLoginRequiredLocation http://example.com/login.html Session On SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretLa page du message d'erreur doit contenir un formulaire de @@ -275,13 +265,11 @@ SessionCryptoPassphrase secret protégée originale, cette dernière n'ayant pas besoin d'être connue de la page en cours.
-@@ -600,14 +580,12 @@ aprExemple de formulaire de connexion à la volée
-<form method="POST" action=""> +Exemple de formulaire de connexion à la volée
<form method="POST" action=""> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" /> -</form> -+</form>Lorsque l'utilisateur final a entré ses informations de @@ -316,16 +304,14 @@ SessionCryptoPassphrase secret comme dans l'exemple suivant :
Exemple de formulaire avec conservation du - contenu
-<form method="POST" action=""> + contenu<form method="POST" action=""> Username: <input type="text" name="httpd_username" value="" /> Password: <input type="password" name="httpd_password" value="" /> <input type="submit" name="login" value="Login" />+</form>
<input type="hidden" name="httpd_method" value="POST" /> <input type="hidden" name="httpd_mimetype" value="application/x-www-form-urlencoded" /> <input type="hidden" name="httpd_body" value="name1=value1&name2=value2" />
-</form> -La manière dont la méthode, le type MIME et le contenu de la @@ -344,11 +330,9 @@ SessionCryptoPassphrase secret connexion en utilisant un script CGI ou une autre technologie dynamique.
-@@ -369,14 +353,12 @@ SessionCryptoPassphrase secret donner la possibilité de se connecter à nouveau.Exemple avec script CGI
- AuthFormProvider file +Exemple avec script CGI
AuthFormProvider file ErrorDocument 401 /cgi-bin/login.cgi - ... -+ ...Exemple simple de configuration de la - déconnexion
-SetHandler form-logout-handler + déconnexionSetHandler form-logout-handler AuthName realm AuthFormLogoutLocation http://example.com/loggedout.html Session On SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretNotez que la déconnexion d'un utilisateur ne supprime pas la @@ -390,14 +372,12 @@ SessionCryptoPassphrase secret
Exemple simple avec durée de validité de session - limitée
-SetHandler form-logout-handler + limitéeSetHandler form-logout-handler AuthFormLogoutLocation http://example.com/loggedout.html Session On SessionMaxAge 1 SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretform-logout-handler, la page spécifiée par cette directive sera présentée à l'utilisateur final. Par exemple : -Exemple
-<Location /logout> +Exemple
<Location /logout> SetHandler form-logout-handler AuthFormLogoutLocation http://example.com/loggedout.html Session on #... -</Location> -+</Location>Si un utilisateur tente d'accéder à l'URI /logout/, il @@ -700,8 +678,7 @@ zone concern
-mod_authn_file. Assurez-vous que le fournisseur choisi soit bien présent dans le serveur.@@ -469,14 +451,12 @@ an authorization provider. andExemple
-<Location /secure> +Exemple
<Location /secure> AuthType form AuthName "private area" AuthFormProvider dbm @@ -709,8 +686,7 @@ zone concern AuthDBMUserFile /www/etc/dbmpasswd Require valid-user #... -</Location> -+</Location>Les différents fournisseurs sont implémentés par les modules diff --git a/docs/manual/mod/mod_authn_anon.html.en b/docs/manual/mod/mod_authn_anon.html.en index dda7c52038..c3d00c2ed4 100644 --- a/docs/manual/mod/mod_authn_anon.html.en +++ b/docs/manual/mod/mod_authn_anon.html.en @@ -93,8 +93,7 @@ (
Anonymous_LogEmail) -@@ -133,9 +131,7 @@ password verification 'Example
-<Directory /var/www/html/private> +Example
<Directory /var/www/html/private> AuthName "Use 'anonymous' & Email address for guest entry" AuthType Basic AuthBasicProvider file anon @@ -107,8 +106,7 @@ Anonymous anonymous guest www test welcome Require valid-user -</Directory> -+</Directory>anonymous' is always one of the allowed userIDs. -Example:
- Anonymous anonymous "Not Registered" "I don't know" -+Example:
Anonymous anonymous "Not Registered" "I don't know"This would allow the user to enter without password diff --git a/docs/manual/mod/mod_authn_anon.html.fr b/docs/manual/mod/mod_authn_anon.html.fr index ef4405fc4c..61eb1a5eb6 100644 --- a/docs/manual/mod/mod_authn_anon.html.fr +++ b/docs/manual/mod/mod_authn_anon.html.fr @@ -98,8 +98,7 @@ authentifi (
Anonymous_LogEmail) -@@ -139,9 +137,7 @@ acc Il est fortement conseillé d'intégrer l'utilisateur spécial 'Exemple
-<Directory /var/www/html/private> +Exemple
<Directory /var/www/html/private> AuthName "Use 'anonymous' & Email address for guest entry" AuthType Basic AuthBasicProvider file anon @@ -112,8 +111,7 @@ authentifi Anonymous anonymous guest www test welcome Require valid-user -</Directory> -+</Directory>anonymous' dans la liste des identifiants. -@@ -1217,7 +1190,7 @@ distant utilis utiliser de nom d'utilisateur dédié via la directiveExemple:
- Anonymous anonymous "Not Registered" "I don't know" -+Exemple:
Anonymous anonymous "Not Registered" "I don't know"Dans cet exemple, l'utilisateur peut accéder au site sans diff --git a/docs/manual/mod/mod_authn_core.html.en b/docs/manual/mod/mod_authn_core.html.en index b0fecc8f62..46688e0ac9 100644 --- a/docs/manual/mod/mod_authn_core.html.en +++ b/docs/manual/mod/mod_authn_core.html.en @@ -68,8 +68,7 @@
This example checks for passwords in two different text files.
-@@ -1104,7 +1077,7 @@ to perform a DN lookupChecking multiple text password files
-# Check here first +Checking multiple text password files
# Check here first <AuthnProviderAlias file file1> AuthUserFile /www/conf/passwords1 </AuthnProviderAlias> @@ -85,8 +84,7 @@ AuthType Basic AuthName "Protected Area" Require valid-user -</Directory> -+</Directory>The example below creates two different ldap authentication @@ -94,8 +92,7 @@ a single authenticated location to be serviced by multiple ldap hosts:
-diff --git a/docs/manual/mod/mod_authnz_ldap.html.en b/docs/manual/mod/mod_authnz_ldap.html.en index 58d21684e7..54ff25503b 100644 --- a/docs/manual/mod/mod_authnz_ldap.html.en +++ b/docs/manual/mod/mod_authnz_ldap.html.en @@ -368,11 +368,9 @@ for HTTP Basic authentication.Checking multiple LDAP servers
-<AuthnProviderAlias ldap ldap-alias1> +@@ -148,9 +144,7 @@ authenticationChecking multiple LDAP servers
<AuthnProviderAlias ldap ldap-alias1> AuthLDAPBindDN cn=youruser,o=ctx AuthLDAPBindPassword yourpassword AuthLDAPURL ldap://ldap.host/o=ctx @@ -119,8 +116,7 @@ Alias /secure /webpages/secure # Note that Require ldap-* would not work here, since the # AuthnProviderAlias does not provide the config to authorization providers # that are implemented in the same module as the authentication provider. -</Directory> -+</Directory>For example:
-- AuthName "Top Secret" -+AuthName "Top Secret"The string provided for the
-AuthNameis what will @@ -215,8 +209,7 @@ the specified alias in the following example, clients may access the/www/docs/publicdirectory without authenticating:-<Directory /www/docs> +<Directory /www/docs> AuthType Basic AuthName Documents AuthBasicProvider file @@ -227,8 +220,7 @@ the specified alias <Directory /www/docs/public> AuthType None Require all granted -</Directory> -+</Directory>When disabling authentication, note that clients which have diff --git a/docs/manual/mod/mod_authn_core.html.fr b/docs/manual/mod/mod_authn_core.html.fr index 1cf9a2b6c6..d0d5b9f0b6 100644 --- a/docs/manual/mod/mod_authn_core.html.fr +++ b/docs/manual/mod/mod_authn_core.html.fr @@ -71,8 +71,7 @@ d'authentification textes différents.@@ -101,8 +99,7 @@ d'authentification ldap :Vérification dans plusieurs fichiers de mots de - passe au format texte
-# Première vérification + passe au format texte# Première vérification <AuthnProviderAlias file file1> AuthUserFile /www/conf/passwords1 </AuthnProviderAlias> @@ -88,8 +87,7 @@ d'authentification AuthType Basic AuthName "Protected Area" Require valid-user -</Directory> -+</Directory>@@ -155,9 +151,7 @@ l'authentification HTTPVérification auprès de plusieurs serveurs - LDAP
-<AuthnProviderAlias ldap ldap-alias1> + LDAP<AuthnProviderAlias ldap ldap-alias1> AuthLDAPBindDN cn=youruser,o=ctx AuthLDAPBindPassword yourpassword AuthLDAPURL ldap://ldap.host/o=ctx @@ -127,8 +124,7 @@ Alias /secure /webpages/secure # AuthnProviderAlias ne fournit pas de configuration pour les # fournisseurs d'autorisation implémentés dans le même module que le # fournisseur d'authentification. -</Directory> -+</Directory>Par exemple :
-- AuthName "Top Secret" -+AuthName "Top Secret"La chaîne fournie comme argument à
-AuthName@@ -224,8 +218,7 @@ l'alias sp l'exemple suivant, les clients peuvent accéder au répertoire/www/docs/publicsans devoir s'authentifier :-<Directory /www/docs> +<Directory /www/docs> AuthType Basic AuthName Documents AuthBasicProvider file @@ -236,8 +229,7 @@ l'alias sp <Directory /www/docs/public> AuthType None Require all granted -</Directory> -+</Directory>Veuillez noter que, lorsque l'authentification n'est pas diff --git a/docs/manual/mod/mod_authn_dbd.html.en b/docs/manual/mod/mod_authn_dbd.html.en index 9991809b84..dc58abbd59 100644 --- a/docs/manual/mod/mod_authn_dbd.html.en +++ b/docs/manual/mod/mod_authn_dbd.html.en @@ -89,8 +89,7 @@ to cache credentials and take most of the load off the database.This simple example shows use of this module in the context of the Authentication and DBD frameworks.
--# mod_dbd configuration +# mod_dbd configuration # UPDATED to include authentication cacheing DBDriver pgsql DBDParams "dbname=apacheauth user=apache password=xxxxxx" @@ -118,8 +117,7 @@ DBDExptime 300 # mod_authn_dbd SQL query to authenticate a user AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" -</Directory> -+</Directory>@@ -164,9 +162,7 @@ configuration required in some web applications. will be passed as a single string parameter when the SQL query is executed. It may be referenced within the query statement using a%sformat specifier. --AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" -+AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"The first column value of the first row returned by the query statement should be a string containing the encrypted password. @@ -199,9 +195,7 @@ AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" The user's ID and the realm, in that order, will be passed as string parameters when the SQL query is executed. They may be referenced within the query statement using
-%sformat specifiers.-AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s" -+AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s"The first column value of the first row returned by the query statement should be a string containing the encrypted password. diff --git a/docs/manual/mod/mod_authn_dbd.html.fr b/docs/manual/mod/mod_authn_dbd.html.fr index 1ab41ad58c..abaf7e99b3 100644 --- a/docs/manual/mod/mod_authn_dbd.html.fr +++ b/docs/manual/mod/mod_authn_dbd.html.fr @@ -92,8 +92,7 @@ soulager ainsi la base de donn
Voici un exemple simple d'utilisation de ce module dans un contexte d'authentification et de bases de données.
--# configuration de mod_dbd modifiée pour inclure la mise en cache de +# configuration de mod_dbd modifiée pour inclure la mise en cache de # l'authentification DBDriver pgsql DBDParams "dbname=apacheauth user=apache password=xxxxxx" @@ -123,8 +122,7 @@ DBDExptime 300 # la requête SQL de mod_authn_dbd pour authentifier un utilisateur AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" -</Directory> -+</Directory>@@ -176,9 +174,7 @@ utilisateur paramètre sous forme d'une seule chaîne de caractères lorsque la requête sera exécutée. Cet identifiant est référencé dans la requête en utilisant le spécificateur de format%s. --AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s" -+AuthDBDUserPWQuery "SELECT password FROM authn WHERE user = %s"La première colonne du premier enregistrement renvoyé par la requête se présentera sous la forme d'une chaîne de caractères @@ -217,9 +213,7 @@ passe pour un utilisateur et un identifiant d'authentification. sont passés dans cet ordre comme paramètres à l'exécution de la requête. Ils sont référencés dans la chaîne de la requête en utilisant des spécificateurs de format
-%s.-AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s" -+AuthDBDUserRealmQuery "SELECT password FROM authn WHERE user = %s AND realm = %s"La première colonne du premier enregistrement renvoyé par la requête se présentera sous la forme d'une chaîne de caractères diff --git a/docs/manual/mod/mod_authn_socache.html.en b/docs/manual/mod/mod_authn_socache.html.en index f2456ef901..f6bef6d0a9 100644 --- a/docs/manual/mod/mod_authn_socache.html.en +++ b/docs/manual/mod/mod_authn_socache.html.en @@ -85,8 +85,7 @@ the load on backends
A simple usage example to accelerate
-mod_authn_dbdusing dbm as a cache engine:-#AuthnCacheSOCache is optional. If specified, it is server-wide +#AuthnCacheSOCache is optional. If specified, it is server-wide AuthnCacheSOCache dbm <Directory /usr/www/myhost/private> AuthType Basic @@ -97,8 +96,7 @@ AuthnCacheSOCache dbm Require valid-user #Optional AuthnCacheContext dbd-authn-example -</Directory> -+</Directory>@@ -175,9 +173,7 @@ AuthnCacheSOCache dbmdiff --git a/docs/manual/mod/mod_authn_socache.html.fr b/docs/manual/mod/mod_authn_socache.html.fr index 44780f2b49..4f77ffa9cd 100644 --- a/docs/manual/mod/mod_authn_socache.html.fr +++ b/docs/manual/mod/mod_authn_socache.html.fr @@ -94,8 +94,7 @@ la charge des serveurs d'arriFor example, to cache credentials found by
-mod_authn_dbdor by a custom provider myprovider, but leave those looked up by lightweight providers like file or dbm lookup alone:-AuthnCacheProvideFor dbd myprovider -+AuthnCacheProvideFor dbd myproviderVoici un exemple simple permettant d'accélérer
-mod_authn_dbdet utilisant dbm comme moteur de la mise en cache :- #AuthnCacheSOCache est optionnel. S'il est défini, il l'est pour +#AuthnCacheSOCache est optionnel. S'il est défini, il l'est pour #l'ensemble du serveur AuthnCacheSOCache dbm <Directory /usr/www/myhost/private> @@ -107,8 +106,7 @@ AuthnCacheSOCache dbm Require valid-user #Optionnel AuthnCacheContext dbd-authn-example -</Directory> -+</Directory>@@ -197,9 +195,7 @@ mise en cache trouvées pardiff --git a/docs/manual/mod/mod_authnz_fcgi.html.en b/docs/manual/mod/mod_authnz_fcgi.html.en index 8ba5a0777f..7ce270323a 100644 --- a/docs/manual/mod/mod_authnz_fcgi.html.en +++ b/docs/manual/mod/mod_authnz_fcgi.html.en @@ -98,8 +98,7 @@ and Access Control expected to authenticate the client using the provided user id and password. Example application: -mod_authn_dbdou par un fournisseur personnalisé mon-fournisseur, et ne pas mettre en cache celles trouvées par les fournisseurs légers comme file ou dbm : --AuthnCacheProvideFor dbd mon-fournisseur -+AuthnCacheProvideFor dbd mon-fournisseur-#!/usr/bin/perl +Example configuration: -#!/usr/bin/perl use FCGI; while (FCGI::accept >= 0) { die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR"; @@ -119,20 +118,17 @@ while (FCGI::accept >= 0) { else { print "Status: 401\n\n"; } -} -+}-AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/ +@@ -145,8 +141,7 @@ AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/ AuthnzFcgiDefineProvider. When invoked, the application is expected to authorize the client using the provided user id and other request data. Example application: -AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/ <Location /protected/> AuthType Basic AuthName "Restricted" AuthBasicProvider FooAuthn Require ... -</Location> -+</Location>-#!/usr/bin/perl +Example configuration: -#!/usr/bin/perl use FCGI; while (FCGI::accept >= 0) { die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHORIZER"; @@ -164,20 +159,17 @@ while (FCGI::accept >= 0) { else { print "Status: 403\n\n"; } -} -+}-AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10103/ +@@ -197,8 +189,7 @@ AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10103/ authorization phase (viaAuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10103/ <Location /protected/> AuthType ... AuthName ... AuthBasicProvider ... Require FooAuthz -</Location> -+</Location>Require), mod_authnz_fcgi will return success for the authorization phase without invoking the application. Example application: --#!/usr/bin/perl +Example configuration: -#!/usr/bin/perl use FCGI; while (FCGI::accept >= 0) { die if $ENV{'FCGI_APACHE_ROLE'}; @@ -219,20 +210,17 @@ while (FCGI::accept >= 0) { else { print "Status: 401\n\n"; } -} -+}-AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/ +@@ -245,8 +233,7 @@ AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/ provider type authn usingAuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/ <Location /protected/> AuthType Basic AuthName "Restricted" AuthBasicProvider FooAuthnz Require FooAuthnz -</Location> -+</Location>AuthnzFcgiDefineProvider.AuthnzFcgiCheckAuthnProviderspecifies when it is called. Example application: --#!/usr/bin/perl +Example configuration: -#!/usr/bin/perl use FCGI; while (FCGI::accept >= 0) { die if $ENV{'FCGI_APACHE_ROLE'} ne "AUTHENTICATOR"; @@ -271,13 +258,11 @@ while (FCGI::accept >= 0) { # If a response body is written here, it will be returned to # the client. } -} -+}-AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/ +@@ -303,10 +287,8 @@ AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/ separate providers as follows, even if they map to the same application: -AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/ <Location /protected/> AuthType ... AuthName ... @@ -286,8 +271,7 @@ AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10103/ RequireBasicAuth Off \ UserExpr "%{reqenv:REMOTE_USER}" Require ... -</Location> -+</Location>-AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/ -AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10102/ -+AuthnzFcgiDefineProvider authn FooAuthn fcgi://localhost:10102/ +AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10102/Specify the authn provider on @@ -314,12 +296,10 @@ AuthnzFcgiDefineProvider authz FooAuthz fcgi://localhost:10102/ and the authz provider onRequire: --AuthType Basic +@@ -327,20 +307,16 @@ Require FooAuthz (authentication and authorizer in one invocation), define a single provider as follows: -AuthType Basic AuthName "Restricted" AuthBasicProvider FooAuthn -Require FooAuthz -+Require FooAuthz-AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/ -+AuthnzFcgiDefineProvider authnz FooAuthnz fcgi://localhost:10103/Specify the authnz provider on bothAuthBasicProviderandRequire: --AuthType Basic +@@ -425,9 +401,7 @@ Require FooAuthnz to configure a log level specific to mod_authnz_fcgi. For example: -AuthType Basic AuthName "Restricted" AuthBasicProvider FooAuthnz -Require FooAuthnz -+Require FooAuthnz-LogLevel info authnz_fcgi:trace8 -+LogLevel info authnz_fcgi:trace8ldap://ldap/o=Example?cn(i.e.,cnis used for searches), the following Require directives could be used to restrict access: --Require ldap-user "Barbara Jenson" +Require ldap-user "Barbara Jenson" Require ldap-user "Fred User" -Require ldap-user "Joe Manager" -+Require ldap-user "Joe Manager"Because of the way that
-mod_authnz_ldaphandles this @@ -396,12 +394,10 @@ Require ldap-user "Joe Manager" group. Note: Do not surround the group name with quotes. For example, assume that the following entry existed in the LDAP directory:-dn: cn=Administrators, o=Example ++uniqueMember: cn=Fred User, o=Exampledn: cn=Administrators, o=Example objectClass: groupOfUniqueNames uniqueMember: cn=Barbara Jenson, o=Example -uniqueMember: cn=Fred User, o=Example -The following directive would grant access to both Fred and Barbara:
@@ -412,8 +408,7 @@ uniqueMember: cn=Fred User, o=Example ifAuthLDAPMaxSubGroupDepthis set to a value greater than 0. For example, assume the following entries exist in the LDAP directory: --dn: cn=Employees, o=Example ++uniqueMember: cn=Elliot Rhodes, o=Exampledn: cn=Employees, o=Example objectClass: groupOfUniqueNames uniqueMember: cn=Managers, o=Example uniqueMember: cn=Administrators, o=Example @@ -438,17 +433,14 @@ uniqueMember: cn=Temporary Employees, o=Example dn: cn=Temporary Employees, o=Example objectClass: groupOfUniqueNames uniqueMember: cn=Jim Swenson, o=Example -uniqueMember: cn=Elliot Rhodes, o=Example -The following directives would allow access for Bob Ellis, Tom Jackson, Barbara Jensen, Fred User, Allan Jefferson, and Paul Tilley but would not allow access for Jim Swenson, or Elliot Rhodes (since they are at a sub-group depth of 2):
--Require ldap-group cn=Employees, o-Example -AuthLDAPMaxSubGroupDepth 1 -+Require ldap-group cn=Employees, o-Example +AuthLDAPMaxSubGroupDepth 1Behavior of this directive is modified by the
AuthLDAPGroupAttribute,AuthLDAPGroupAttributeIsDN,AuthLDAPMaxSubGroupDepth,AuthLDAPSubGroupAttribute, andAuthLDAPSubGroupClass@@ -534,10 +526,8 @@ AuthLDAPMaxSubGroupDepth 1Grant access to anyone who exists in the LDAP directory, using their UID for searches. - @@ -546,8 +536,7 @@ Require valid-user that have useful defaults omitted. Also, note the use of a redundant LDAP server.-AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)" -Require valid-user -+AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)" +Require valid-userAuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example" -Require valid-user -+Require valid-user @@ -560,20 +549,16 @@ Require valid-user this approach is not recommended: it's a better idea to choose an attribute that is guaranteed unique in your directory, such asuid. --AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn" -Require valid-user -+AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn" +Require valid-userGrant access to anybody in the Administrators group. The users must authenticate using their UID. - @@ -581,10 +566,8 @@ Require ldap-group cn=Administrators, o=Example Grant access to anybody in the group whose name matches the hostname of the virtual host. In this example an expression is used to build the filter. --AuthLDAPURL ldap://ldap.example.com/o=Example?uid -Require ldap-group cn=Administrators, o=Example -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid +Require ldap-group cn=Administrators, o=Example-AuthLDAPURL ldap://ldap.example.com/o=Example?uid -Require ldap-group cn=%{SERVER_NAME}, o=Example -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid +Require ldap-group cn=%{SERVER_NAME}, o=Example@@ -594,10 +577,8 @@ Require ldap-group cn=%{SERVER_NAME}, o=Example ofqpagePagerID. The example will grant access only to people (authenticated via their UID) who have alphanumeric pagers: --AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*) -Require valid-user -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*) +Require valid-user@@ -611,10 +592,8 @@ Require valid-user a pager, plus grant access to Joe Manager, who doesn't have a pager, but does need to access the same resource: --AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager)) -Require valid-user -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager)) +Require valid-userThis last may look confusing at first, so it helps to @@ -704,11 +683,9 @@ Require valid-user subtree search for the attribute userPrincipalName, with an empty search root, like so:
--AuthLDAPBindDN apache@example.com +AuthLDAPBindDN apache@example.com AuthLDAPBindPassword password -AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub -+AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?subUsers will need to enter their User Principal Name as a login, in @@ -732,11 +709,9 @@ AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub authentication to it is a matter of adding the following directives to every
-.htaccessfile that gets created in the web-AuthLDAPURL "the url" +AuthLDAPURL "the url" AuthGroupFile mygroupfile -Require group mygroupfile -+Require group mygroupfileHow It Works
@@ -882,16 +857,14 @@ authorizationIf 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 "exec:/path/to/otherProgram argument1"#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" -AuthLDAPBindDN. -AuthLDAPInitialBindPattern (.+) $1@example.com+AuthLDAPInitialBindPattern (.+) $1@example.comAuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=comdiff --git a/docs/manual/mod/mod_authnz_ldap.html.fr b/docs/manual/mod/mod_authnz_ldap.html.fr index 30ee439c04..ffbfaaf194 100644 --- a/docs/manual/mod/mod_authnz_ldap.html.fr +++ b/docs/manual/mod/mod_authnz_ldap.html.fr @@ -402,11 +402,9 @@ Directorycnsera utilisé pour les recherches), on pourra utiliser les directives Require suivantes pour restreindre l'accès : --Require ldap-user "Barbara Jenson" +Require ldap-user "Barbara Jenson" Require ldap-user "Fred User" -Require ldap-user "Joe Manager" -+Require ldap-user "Joe Manager"De par la manière dont
-mod_authnz_ldaptraite @@ -431,12 +429,10 @@ Require ldap-user "Joe Manager" DN du groupe LDAP. Note : n'entourez pas le nom du groupe avec des guillemets. Par exemple, supposons que l'entrée suivante existe dans l'annuaire LDAP :-dn: cn=Administrators, o=Example ++uniqueMember: cn=Fred User, o=Exampledn: cn=Administrators, o=Example objectClass: groupOfUniqueNames uniqueMember: cn=Barbara Jenson, o=Example -uniqueMember: cn=Fred User, o=Example -La directive suivante autoriserait alors l'accès à Fred et Barbara :
@@ -447,8 +443,7 @@ uniqueMember: cn=Fred User, o=Example groupe LDAP spécifié si la directiveAuthLDAPMaxSubGroupDeptha été définie à une valeur supérieure à 0. Par exemple, supposons que les entrées suivantes existent dans l'annuaire LDAP : --dn: cn=Employees, o=Example ++uniqueMember: cn=Elliot Rhodes, o=Exampledn: cn=Employees, o=Example objectClass: groupOfUniqueNames uniqueMember: cn=Managers, o=Example uniqueMember: cn=Administrators, o=Example @@ -473,18 +468,15 @@ uniqueMember: cn=Temporary Employees, o=Example dn: cn=Temporary Employees, o=Example objectClass: groupOfUniqueNames uniqueMember: cn=Jim Swenson, o=Example -uniqueMember: cn=Elliot Rhodes, o=Example -Les directives suivantes autoriseraient alors l'accès à Bob Ellis, Tom Jackson, Barbara Jensen, Fred User, Allan Jefferson, et Paul Tilley, mais l'interdiraient à Jim Swenson, ou Elliot Rhodes (car ils sont situés dans un sous-groupe de niveau de profondeur 2) :
--Require ldap-group cn=Employees, o-Example -AuthLDAPMaxSubGroupDepth 1 -+Require ldap-group cn=Employees, o-Example +AuthLDAPMaxSubGroupDepth 1Le comportement de cette directive est modifié par les directives @@ -583,10 +575,8 @@ AuthLDAPMaxSubGroupDepth 1 Accorde l'autorisation d'accès à tout utilisateur présent dans l'annuaire LDAP, en utilisant son UID pour effectuer la recherche : -
-AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)" -Require valid-user -+AuthLDAPURL "ldap://ldap1.example.com:389/ou=People, o=Example?uid?sub?(objectClass=*)" +Require valid-user@@ -595,8 +585,7 @@ Require valid-user dont les valeurs par défaut conviennent sont omis. Notez aussi la présence d'un annuaire LDAP redondant :AuthLDAPURL "ldap://ldap1.example.com ldap2.example.com/ou=People, o=Example" -Require valid-user -+Require valid-user @@ -610,10 +599,8 @@ Require valid-user approche n'est pas recommandée : il est préférable de choisir un attribut de votre annuaire dont l'unicité soit garantie, commeuid. --AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn" -Require valid-user -+AuthLDAPURL "ldap://ldap.example.com/ou=People, o=Example?cn" +Require valid-user@@ -621,10 +608,8 @@ Require valid-user Accorde l'autorisation d'accès à tout utilisateur appartenant au groupe Administrateurs. Les utilisateurs doivent s'authentifier en utilisant leur UID : --AuthLDAPURL ldap://ldap.example.com/o=Example?uid -Require ldap-group cn=Administrators, o=Example -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid +Require ldap-group cn=Administrators, o=Example@@ -633,10 +618,8 @@ Require ldap-group cn=Administrators, o=Example nom correspond au nom d'hôte du serveur virtuel. Dans cet exemple, on utilise une expression pour construire le filtre. --AuthLDAPURL ldap://ldap.example.com/o=Example?uid -Require ldap-group cn=%{SERVER_NAME}, o=Example -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid +Require ldap-group cn=%{SERVER_NAME}, o=Example@@ -646,10 +629,8 @@ Require ldap-group cn=%{SERVER_NAME}, o=Example attribut LDAPqpagePagerID. Seuls ces utilisateurs (authentifiés via leur UID) se verront accorder l'autorisation d'accès : --AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*) -Require valid-user -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(qpagePagerID=*) +Require valid-user@@ -663,10 +644,8 @@ Require valid-user tout utilisateur disposant d'un bippeur ainsi qu'à Joe Manager qui ne possède pas de bippeur, mais doit tout de même pouvoir accéder à la ressource : --AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager)) -Require valid-user -+AuthLDAPURL ldap://ldap.example.com/o=Example?uid??(|(qpagePagerID=*)(uid=jmanager)) +Require valid-userCe dernier exemple peut sembler confus au premier abord ; en @@ -770,11 +749,9 @@ Directory l'attribut userPrincipalName, avec une base de recherche vide, comme suit :
--AuthLDAPBindDN apache@example.com +AuthLDAPBindDN apache@example.com AuthLDAPBindPassword password -AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub -+AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?subLes utilisateurs devront s'authentifier en entrant leur UPN, de @@ -799,11 +776,9 @@ AuthLDAPURL ldap://10.0.0.1:3268/?userPrincipalName?sub l'authentification LDAP consiste à ajouter les directives suivantes à chaque fichier
-.htaccessqui sera créé dans le site web :-AuthLDAPURL "the url" +AuthLDAPURL "the url" AuthGroupFile mygroupfile -Require group mygroupfile -+Require group mygroupfileComment ça marche
@@ -972,16 +947,14 @@ serveur HTTP Apache.Si la valeur commence par exec:, la commande résultante sera exécutée, et la première ligne renvoyée sur la sortie standard sera utilisée comme mot de passe.
--#Mot de passe utilisé tel quel ++AuthLDAPBindPassword "exec:/path/to/otherProgram argument1"#Mot de passe utilisé tel quel AuthLDAPBindPassword secret #Exécute /path/to/program pour obtenir le mot de passe AuthLDAPBindPassword exec:/path/to/program #Exécute /path/to/otherProgram avec un argument pour obtenir le mot de passe -AuthLDAPBindPassword "exec:/path/to/otherProgram argument1" -AuthLDAPBindDN. -AuthLDAPInitialBindPattern (.+) $1@example.com+AuthLDAPInitialBindPattern (.+) $1@example.comAuthLDAPInitialBindPattern (.+) cn=$1,dc=example,dc=comdiff --git a/docs/manual/mod/mod_authz_core.html.en b/docs/manual/mod/mod_authz_core.html.en index e175cf4464..e0d01f921a 100644 --- a/docs/manual/mod/mod_authz_core.html.en +++ b/docs/manual/mod/mod_authz_core.html.en @@ -83,8 +83,7 @@ not belong to either thetempsgroup or the LDAP groupTemporary Employees. --<Directory /www/mydocs> +<Directory /www/mydocs> <RequireAll> <RequireAny> Require user superadmin @@ -102,8 +101,7 @@ Require ldap-group cn=Temporary Employees,o=Airius </RequireNone> </RequireAll> -</Directory> -+</Directory>@@ -127,12 +125,10 @@-User-Agent(browser type),Referer, or other HTTP request header fields. --SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in <Directory /docroot> Require env let_me_in -</Directory> -+</Directory>In this case, browsers with a user-agent string beginning @@ -168,14 +164,10 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in 'granted' or 'denied'. The following examples will grant or deny access to all requests.
-- Require all granted -+Require all granted-- Require all denied -+Require all denied@@ -190,21 +182,17 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_inThe following example will only allow GET, HEAD, POST, and OPTIONS requests:
-- Require method GET POST OPTIONS -+Require method GET POST OPTIONSThe following example will allow GET, HEAD, POST, and OPTIONS requests without authentication, and require a valid user for all other methods:
--<RequireAny> - Require method GET POST OPTIONS - Require valid-user -</RequireAny> -+<RequireAny> + Require method GET POST OPTIONS + Require valid-user +</RequireAny>@@ -214,9 +202,7 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_inThe
-exprprovider allows to base authorization decisions on arbitrary expressions.- Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17" -+Require expr "%{TIME_HOUR} -ge 9 && %{TIME_HOUR} -le 17"The syntax is described in the ap_expr @@ -249,8 +235,7 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in multiple ldap hosts:
--<AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx> +@@ -328,8 +312,7 @@ sections. preceding sections. Thus only users belong to the group<AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx> AuthLDAPBindDN cn=youruser,o=ctx AuthLDAPBindPassword yourpassword AuthLDAPURL ldap://ldap.host/o=ctx @@ -274,8 +259,7 @@ Alias /secure /webpages/secure #implied OR operation Require ldap-group-alias1 Require ldap-group-alias2 -</Directory> -+</Directory>gammamay access/www/docs/ab/gamma.-<Directory /www/docs> +<Directory /www/docs> AuthType Basic AuthName Documents AuthBasicProvider file @@ -344,8 +327,7 @@ sections. <Directory /www/docs/ab/gamma> Require group gamma -</Directory> -+</Directory>AuthGroupFile(to define users and groups) in order to work correctly. Example: --AuthType Basic +AuthType Basic AuthName "Restricted Resource" AuthBasicProvider file AuthUserFile /web/users AuthGroupFile /web/groups -Require group admin -+Require group adminAccess controls which are applied in this way are effective for @@ -499,14 +479,12 @@ Require group admin and
-betagroups are authorized, except for those who are also in therejectgroup.-<Directory /www/docs> +<Directory /www/docs> <RequireAll> Require group alpha beta Require not group reject </RequireAll> -</Directory> -+</Directory>When multiple
-Requiredirectives are diff --git a/docs/manual/mod/mod_authz_core.html.fr b/docs/manual/mod/mod_authz_core.html.fr index 4d25ec81df..c35b4adf9f 100644 --- a/docs/manual/mod/mod_authz_core.html.fr +++ b/docs/manual/mod/mod_authz_core.html.fr @@ -81,8 +81,7 @@ d'autorisation l'utilisateur ne doit appartenir ni au groupetemps, ni au groupe LDAPEmployés temporaires.-<Directory /www/mydocs> +<Directory /www/mydocs> <RequireAll> <RequireAny> Require user superadmin @@ -100,8 +99,7 @@ d'autorisation Require ldap-group cn=Employés temporaires,o=Airius </RequireNone> </RequireAll> -</Directory> -+</Directory>@@ -126,12 +124,10 @@ d'autorisation-User-Agent(type de navigateur),Referer, entre autres. --SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in +SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in <Directory /docroot> Require env let_me_in -</Directory> -+</Directory>Avec cet exemple, les navigateurs dont la chaîne user-agent @@ -157,14 +153,10 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in sont : 'granted' ou 'denied'. Les exemples suivants autorisent ou interdisent l'accès à toutes les requêtes.
-- Require all granted -+Require all granted-- Require all denied -+Require all denied@@ -180,21 +172,17 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_inDans l'exemple suivant, seules les méthodes GET, HEAD, POST, et OPTIONS sont autorisées :
-- Require method GET POST OPTIONS -+Require method GET POST OPTIONSDans l'exemple suivant, les méthodes GET, HEAD, POST, et OPTIONS sont autorisées sans authentification, alors que toutes les autres méthodes nécessitent un utilisateur valide :
--<RequireAny> - Require method GET POST OPTIONS - Require valid-user -</RequireAny> -+<RequireAny> + Require method GET POST OPTIONS + Require valid-user +</RequireAny>@@ -203,9 +191,7 @@ SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_inLe fournisseur
-exprpermet d'accorder l'autorisation d'accès 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"La syntaxe de l'expression est décrite dans la documentation de ap_expr.
@@ -240,8 +226,7 @@ d'autorisation serveurs ldap : --<AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx> +@@ -321,8 +305,7 @@ configuration pr appartenant au groupe<AuthzProviderAlias ldap-group ldap-group-alias1 cn=my-group,o=ctx> AuthLDAPBindDN cn=youruser,o=ctx AuthLDAPBindPassword yourpassword AuthLDAPURL ldap://ldap.host/o=ctx @@ -265,8 +250,7 @@ Alias /secure /webpages/secure #Opération logique implicite : OU inclusif Require ldap-group-alias1 Require ldap-group-alias2 -</Directory> -+</Directory>gammasont autorisés à accéder à/www/docs/ab/gamma.-<Directory /www/docs> +<Directory /www/docs> AuthType Basic AuthName Documents AuthBasicProvider file @@ -337,8 +320,7 @@ configuration pr <Directory /www/docs/ab/gamma> Require group gamma -</Directory> -+</Directory>AuthUserFileetAuthGroupFile(pour la définition des utilisateurs et des groupes). Exemple : --AuthType Basic +AuthType Basic AuthName "Restricted Resource" AuthBasicProvider file AuthUserFile /web/users AuthGroupFile /web/groups -Require group admin -+Require group adminLes contrôles d'accès appliqués de cette manière sont effectifs @@ -498,14 +478,12 @@ Require group admin d'accès, à l'exception de ceux appartenant au groupe
-reject.-<Directory /www/docs> +<Directory /www/docs> <RequireAll> Require group alpha beta Require not group reject </RequireAll> -</Directory> -+</Directory>Lorsque plusieurs directives
Requiresont diff --git a/docs/manual/mod/mod_authz_dbd.html.en b/docs/manual/mod/mod_authz_dbd.html.en index 7af548745b..89110cd12a 100644 --- a/docs/manual/mod/mod_authz_dbd.html.en +++ b/docs/manual/mod/mod_authz_dbd.html.en @@ -88,10 +88,8 @@This directive specifies group membership that is required for the user to gain access.
-- Require dbd-group team - AuthzDBDQuery "SELECT group FROM authz WHERE user = %s" -+Require dbd-group team + AuthzDBDQuery "SELECT group FROM authz WHERE user = %s"@@ -101,10 +99,8 @@This directive specifies a query to be run indicating the user has logged in.
-- Require dbd-login - AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" -+Require dbd-login + AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"@@ -114,10 +110,8 @@This directive specifies a query to be run indicating the user has logged out.
-- Require dbd-logout - AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s" -+Require dbd-logout + AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"@@ -153,8 +147,7 @@ to implement functions that start and end client-side sessions.Configuration example
--# mod_dbd configuration +# mod_dbd configuration DBDriver pgsql DBDParams "dbname=apacheauth user=apache pass=xxxxxx" @@ -203,8 +196,7 @@ DBDExptime 300 Require dbd-logout AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s" </Files> -</Directory> -+</Directory>@@ -259,10 +251,8 @@ header is present The first column value of each row returned by the query statement should be a string containing a group name. Zero, one, or more rows may be returned. --Require dbd-group -AuthzDBDQuery "SELECT group FROM groups WHERE user = %s" -+Require dbd-group +AuthzDBDQuery "SELECT group FROM groups WHERE user = %s"When used with a @@ -296,9 +284,7 @@ AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" specific to the user. The user's ID will be passed as a single string parameter when the SQL query is executed. It may be referenced within the query statement using aRequire dbd-loginor @@ -270,10 +260,8 @@ AuthzDBDQuery "SELECT group FROM groups WHERE user = %s" but will instead execute a SQL statement designed to log the user in or out. The user must already be authenticated withmod_authn_dbd. --Require dbd-login -AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" -+Require dbd-login +AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"%sformat specifier. --AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s" -+AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s"The first column value of the first row returned by the query statement should be a string containing a URL to which to redirect diff --git a/docs/manual/mod/mod_authz_dbd.html.fr b/docs/manual/mod/mod_authz_dbd.html.fr index 1569cb4bbd..271bd8c64b 100644 --- a/docs/manual/mod/mod_authz_dbd.html.fr +++ b/docs/manual/mod/mod_authz_dbd.html.fr @@ -90,10 +90,8 @@ d'Apache
Cette directive permet de spécifier à quel groupe un utilisateur doit appartenir pour obtenir l'autorisation d'accès.
-- Require dbd-group team - AuthzDBDQuery "SELECT group FROM authz WHERE user = %s" -+Require dbd-group team + AuthzDBDQuery "SELECT group FROM authz WHERE user = %s"@@ -103,10 +101,8 @@ d'ApacheCette directive permet de spécifier une requête à exécuter pour indiquer que l'utilisateur s'est authentifié.
-- Require dbd-login - AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" -+Require dbd-login + AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"@@ -116,10 +112,8 @@ d'ApacheCette directive permet de spécifier une requête à exécuter pour indiquer que l'utilisateur s'est déconnecté.
-- Require dbd-logout - AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s" -+Require dbd-logout + AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s"@@ -159,8 +153,7 @@ fermeture de sessions cExemple de configuration
--# configuration de mod_dbd +# configuration de mod_dbd DBDriver pgsql DBDParams "dbname=apacheauth user=apache pass=xxxxxx" @@ -212,8 +205,7 @@ DBDExptime 300 Require dbd-logout AuthzDBDQuery "UPDATE authn SET login = 'false' WHERE user = %s" </Files> -</Directory> -+</Directory>@@ -276,10 +268,8 @@ requise doit contenir une chaîne de caractères correspondant à un nom de groupe. La requête peut renvoyer zéro, un ou plusieurs enregistrements. -@@ -145,10 +139,8 @@ of user groups for authorization accomplished by first setting the group and password files to point to the same DBM: --Require dbd-group -AuthzDBDQuery "SELECT group FROM groups WHERE user = %s" -+Require dbd-group +AuthzDBDQuery "SELECT group FROM groups WHERE user = %s"Avec la directive @@ -317,9 +305,7 @@ rediriger l'utilisateur apr forme d'une simple chaîne lorsque la requête SQL sera exécutée. Il y sera fait référence dans la requête en utilisant le spécificateur de formatRequire dbd-loginou @@ -287,10 +277,8 @@ AuthzDBDQuery "SELECT group FROM groups WHERE user = %s" mais au contraire exécutera une requête SQL permettant d'enregistrer la connexion ou la déconnexion de l'utilisateur. Ce dernier doit être déjà authentifié avecmod_authn_dbd. --Require dbd-login -AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s" -+Require dbd-login +AuthzDBDQuery "UPDATE authn SET login = 'true' WHERE user = %s"%s. --AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s" -+AuthzDBDRedirectQuery "SELECT userpage FROM userpages WHERE user = %s"La première colonne du premier enregistrement renvoyé par la requête doit contenir une chaîne de caractères correspondant à une diff --git a/docs/manual/mod/mod_authz_dbm.html.en b/docs/manual/mod/mod_authz_dbm.html.en index b1e71e1972..eca5417e98 100644 --- a/docs/manual/mod/mod_authz_dbm.html.en +++ b/docs/manual/mod/mod_authz_dbm.html.en @@ -69,9 +69,7 @@
This directive specifies group membership that is required for the user to gain access.
-- Require dbm-group admin -+Require dbm-group admin@@ -81,9 +79,7 @@When this directive is specified, the user must be a member of the group assigned to the file being accessed.
-- Require dbm-file-group -+Require dbm-file-group@@ -95,16 +91,14 @@Note that using mod_authz_dbm requires you to require
-dbm-groupinstead ofgroup:-<Directory "/foo/bar"> +<Directory "/foo/bar"> AuthType Basic AuthName "Secure Area" AuthBasicProvider dbm AuthDBMUserFile site/data/users AuthDBMGroupFile site/data/users Require dbm-group admin -</Directory> -+</Directory>-AuthDBMGroupFile /www/userbase -AuthDBMUserFile /www/userbase -+AuthDBMGroupFile /www/userbase +AuthDBMUserFile /www/userbaseThe key for the single DBM is the username. The value consists diff --git a/docs/manual/mod/mod_authz_dbm.html.fr b/docs/manual/mod/mod_authz_dbm.html.fr index 4cc251c46e..b3f99c876b 100644 --- a/docs/manual/mod/mod_authz_dbm.html.fr +++ b/docs/manual/mod/mod_authz_dbm.html.fr @@ -70,9 +70,7 @@
Cette directive permet de spécifier à quel groupe un utilisateur doit appartenir pour obtenir l'autorisation d'accès.
-- Require dbm-group admin -+Require dbm-group admin@@ -82,9 +80,7 @@Lorsque cette directive est définie, l'utilisateur doit appartenir au groupe du fichier pour pouvoir y accéder.
-- Require dbm-file-group -+Require dbm-file-group@@ -97,16 +93,14 @@ groupes d'authentification qui était auparavantgroupest maintenantdbm-group: --<Directory "/foo/bar"> +<Directory "/foo/bar"> AuthType Basic AuthName "Secure Area" AuthBasicProvider dbm AuthDBMUserFile site/data/users AuthDBMGroupFile site/data/users Require dbm-group admin -</Directory> -+</Directory>-AuthDBMGroupFile /www/userbase -AuthDBMUserFile /www/userbase -+AuthDBMGroupFile /www/userbase +AuthDBMUserFile /www/userbaseLa clé du fichier DBM unique est le nom d'utilisateur. La diff --git a/docs/manual/mod/mod_authz_groupfile.html.en b/docs/manual/mod/mod_authz_groupfile.html.en index fcd9e7d2d3..e6748ed1c1 100644 --- a/docs/manual/mod/mod_authz_groupfile.html.en +++ b/docs/manual/mod/mod_authz_groupfile.html.en @@ -69,9 +69,7 @@
This directive specifies group membership that is required for the user to gain access.
-- Require group admin -+Require group admin@@ -81,9 +79,7 @@When this directive is specified, the user must be a member of the group assigned to the file being accessed.
-- Require file-group -+Require file-groupdiff --git a/docs/manual/mod/mod_authz_groupfile.html.fr b/docs/manual/mod/mod_authz_groupfile.html.fr index ca2ba2a8f9..c9116aea40 100644 --- a/docs/manual/mod/mod_authz_groupfile.html.fr +++ b/docs/manual/mod/mod_authz_groupfile.html.fr @@ -70,9 +70,7 @@ fonction de leur appartenanceCette directive permet de spécifier à quel groupe un utilisateur doit appartenir pour obtenir l'autorisation d'accès.
-- Require group admin -+Require group admin@@ -82,9 +80,7 @@ fonction de leur appartenanceLorsque cette directive est définie, l'utilisateur doit appartenir au groupe du fichier pour pouvoir y accéder.
-- Require file-group -+Require file-groupdiff --git a/docs/manual/mod/mod_authz_host.html.en b/docs/manual/mod/mod_authz_host.html.en index b81c0e3a8b..0c659ab241 100644 --- a/docs/manual/mod/mod_authz_host.html.en +++ b/docs/manual/mod/mod_authz_host.html.en @@ -91,38 +91,30 @@ address)A full IP address:
--Require ip 10.1.2.3 -Require ip 192.168.1.104 192.168.1.205 -+Require ip 10.1.2.3 +Require ip 192.168.1.104 192.168.1.205An IP address of a host allowed access
A partial IP address:
--Require ip 10.1 -Require ip 10 172.20 192.168.2 -+Require ip 10.1 +Require ip 10 172.20 192.168.2The first 1 to 3 bytes of an IP address, for subnet restriction.
A network/netmask pair:
-- Require ip 10.1.0.0/255.255.0.0 -+Require ip 10.1.0.0/255.255.0.0A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet restriction.
A network/nnn CIDR specification:
-- Require ip 10.1.0.0/16 -+Require ip 10.1.0.0/16Similar to the previous case, except the netmask consists of nnn high-order 1 bits.
@@ -133,10 +125,8 @@ Require ip 10 172.20 192.168.2IPv6 addresses and IPv6 subnets can be specified as shown below:
--Require ip 2001:db8::a00:20ff:fea7:ccea -Require ip 2001:db8::a00:20ff:fea7:ccea/10 -+Require ip 2001:db8::a00:20ff:fea7:ccea +Require ip 2001:db8::a00:20ff:fea7:ccea/10Note: As the IP addresses are parsed on startup, expressions are @@ -153,10 +143,8 @@ Require ip 2001:db8::a00:20ff:fea7:ccea/10
A (partial) domain-name
--Require host example.org -Require host .net example.edu -+Require host example.org +Require host .net example.eduHosts whose names match, or end in, this string are allowed @@ -187,9 +175,7 @@ Require host .net example.edu
This allows a convenient way to match connections that originate from the local host:
-- Require local -+Require localdiff --git a/docs/manual/mod/mod_authz_host.html.fr b/docs/manual/mod/mod_authz_host.html.fr index 0d4c051c8e..d0ff0371e2 100644 --- a/docs/manual/mod/mod_authz_host.html.fr +++ b/docs/manual/mod/mod_authz_host.html.fr @@ -93,38 +93,30 @@ contrUne adresse IP complète :
--Require ip 10.1.2.3 -Require ip 192.168.1.104 192.168.1.205 -+Require ip 10.1.2.3 +Require ip 192.168.1.104 192.168.1.205L'adresse IP d'un hôte pour qui l'accès est accordé
Une adresse IP partielle :
--Require ip 10.1 -Require ip 10 172.20 192.168.2 -+Require ip 10.1 +Require ip 10 172.20 192.168.2Les 1 à 3 premiers octets d'une adresse IP, pour une restriction à un sous-réseau.
Une paire réseau/masque de sous-réseau :
-- Require ip 10.1.0.0/255.255.0.0 -+Require ip 10.1.0.0/255.255.0.0Un réseau a.b.c.d, et un masque de sous-réseau w.x.y.z. pour une restriction de sous-réseau plus fine.
Une spécification CIDR réseau/nnn :
-- Require ip 10.1.0.0/16 -+Require ip 10.1.0.0/16Identique au cas précédent, excepté que le masque de sous-réseau représente les nnn premiers bits de poids fort.
@@ -135,10 +127,8 @@ Require ip 10 172.20 192.168.2On peut spécifier des adresses et des sous-réseaux IPv6 comme suit :
--Require ip 2001:db8::a00:20ff:fea7:ccea -Require ip 2001:db8::a00:20ff:fea7:ccea/10 -+Require ip 2001:db8::a00:20ff:fea7:ccea +Require ip 2001:db8::a00:20ff:fea7:ccea/10Note: comme les adresses IP sont lues au démarrage, les @@ -155,10 +145,8 @@ Require ip 2001:db8::a00:20ff:fea7:ccea/10
Un nom de domaine (éventuellement partiel)
--Require host example.org -Require host .net example.edu -+Require host example.org +Require host .net example.eduLes hôtes dont les noms correspondent ou se terminent par la @@ -190,9 +178,7 @@ Require host .net example.edu
L'exemple suivant montre une méthode simple pour sélectionner les connexions en provenance de l'hôte local :
-- Require local -+Require localdiff --git a/docs/manual/mod/mod_authz_owner.html.en b/docs/manual/mod/mod_authz_owner.html.en index e12a898ce0..538e79eb17 100644 --- a/docs/manual/mod/mod_authz_owner.html.en +++ b/docs/manual/mod/mod_authz_owner.html.en @@ -96,15 +96,13 @@ files in/home/smith/public_html/privateunless they were owned byjonesinstead ofsmith. --<Directory /home/*/public_html/private> +@@ -120,8 +118,7 @@ authorized to access the<Directory /home/*/public_html/private> AuthType Basic AuthName MyPrivateFiles AuthBasicProvider dbm AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all Require file-owner -</Directory> -+</Directory>project-foodirectories of each other. --<Directory /home/*/public_html/project-foo> +<Directory /home/*/public_html/project-foo> AuthType Basic AuthName "Project Foo Files" AuthBasicProvider dbm @@ -132,8 +129,7 @@ Satisfy All Require file-group -</Directory> -+</Directory>jonesau lieu desmith. --<Directory /home/*/public_html/private> +@@ -132,8 +130,7 @@ fichiers<Directory /home/*/public_html/private> AuthType Basic AuthName MyPrivateFiles AuthBasicProvider dbm AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all Require file-owner -</Directory> -+</Directory>foo, ils seront autorisés à accéder aux répertoiresproject-foode chacun d'entre eux. --<Directory /home/*/public_html/project-foo> +<Directory /home/*/public_html/project-foo> AuthType Basic AuthName "Project Foo Files" AuthBasicProvider dbm @@ -144,8 +141,7 @@ fichiers Satisfy All Require file-group -</Directory> -+</Directory>This directive specifies a list of users that are allowed to gain access.
-- Require user john paul george ringo -+Require user john paul george ringo@@ -82,9 +80,7 @@When this directive is specified, any successfully authenticated user will be allowed to gain access.
-- Require valid-user -+Require valid-userdiff --git a/docs/manual/mod/mod_authz_user.html.fr b/docs/manual/mod/mod_authz_user.html.fr index b286c52bfc..e3c50732db 100644 --- a/docs/manual/mod/mod_authz_user.html.fr +++ b/docs/manual/mod/mod_authz_user.html.fr @@ -71,9 +71,7 @@Cette directive permet de spécifier une liste d'utilisateurs autorisés à accéder à la ressource.
-- Require user john paul george ringo -+Require user john paul george ringo@@ -83,9 +81,7 @@Lorsque cette directive est définie, tout utilisateur qui s'est authentifié avec succès aura l'autorisation d'accès à la ressource.
-- Require valid-user -+Require valid-userdiff --git a/docs/manual/mod/mod_autoindex.html.en b/docs/manual/mod/mod_autoindex.html.en index 9902d60dc3..792dfc50f8 100644 --- a/docs/manual/mod/mod_autoindex.html.en +++ b/docs/manual/mod/mod_autoindex.html.en @@ -225,10 +225,8 @@ icon selected by filename is displayed if the client is image-incapable, has image loading disabled, or fails to retrieve the icon. --AddAlt "PDF file" *.pdf -AddAlt Compressed *.gz *.zip *.Z -+AddAlt "PDF file" *.pdf +AddAlt Compressed *.gz *.zip *.Z- AddAltByEncoding gzip x-gzip -+AddAltByEncoding gzip x-gzip- AddAltByType 'plain text' text/plain -+AddAltByType 'plain text' text/plain"). --AddDescription "The planet Mars" mars.gif -AddDescription "My friend Marshall" friends/mars.gif -+AddDescription "The planet Mars" mars.gif +AddDescription "My friend Marshall" friends/mars.gifThe typical, default description field is 23 bytes wide. 6 @@ -368,12 +360,10 @@ AddDescription "My friend Marshall" friends/mars.gif is unnecessary if you're using
-IndexOptions HTMLTable.-#Examples +#Examples AddIcon (IMG,/icons/image.png) .gif .jpg .png AddIcon /icons/dir.png ^^DIRECTORY^^ -AddIcon /icons/backup.png *~ -+AddIcon /icons/backup.png *~
AddIconByType@@ -403,9 +393,7 @@ content-encodingMIME-encoding is a valid content-encoding, such as
-x-compress.- AddIconByEncoding /icons/compress.png x-compress -+AddIconByEncoding /icons/compress.png x-compressMIME-type is a wildcard expression matching required the mime types.
-- AddIconByType (IMG,/icons/image.png) image/* -+AddIconByType (IMG,/icons/image.png) image/*- DefaultIcon /icon/unknown.png -+DefaultIcon /icon/unknown.png- HeaderName HEADER.html -+HeaderName HEADER.html@@ -486,9 +468,7 @@ of the index listing access the directory being indexed. If Filename begins with a slash, it will be taken to be relative to the@@ -563,9 +539,7 @@ a directory files. By default, the list containsDocumentRoot. -- HeaderName /include/HEADER.html -+HeaderName /include/HEADER.htmlFilename must resolve to a document with a major @@ -498,9 +478,7 @@ of the index listing actual file type (as opposed to its output) is marked as
-text/htmlsuch as with a directive like:- AddType text/html .cgi -+AddType text/html .cgiContent negotiation @@ -537,9 +515,7 @@ of the index listing
The
-IndexHeadInsertdirective specifies a string to insert in the <head> section of the HTML generated for the index page.- IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" -+IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">".(the current directory). -- IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t -+IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t@@ -289,9 +285,7 @@ fichier en fonction de son type MIME peut pas afficher d'images, si le chargement d'images est désactivé ou si l'icône ne peut pas être trouvé. -Regular Expressions
@@ -591,15 +565,13 @@ a directory any files ignored byIndexIgnoreotherwise inherited from other configuration sections. --<Directory /var/www> +<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>@@ -261,9 +259,7 @@ fichier en fonction de son codage MIME peut pas afficher d'images, si le chargement d'images est désactivé ou si l'icône ne peut pas être trouvé. -Review the default configuration for a list of @@ -648,9 +620,7 @@ indexing (It depends on whether the underlying file system uses Unicode filenames or not.) -
- IndexOptions Charset=UTF-8 -+IndexOptions Charset=UTF-8@@ -854,9 +824,7 @@ indexing specify the MIME content-type of the generated page. The default is text/html. -- IndexOptions Type=text/plain -+IndexOptions Type=text/plain@@ -906,19 +874,15 @@ indexingMultiple @@ -933,10 +897,8 @@ indexing clears all inherited options and any incremental settings encountered so far. Consider the following example: -IndexOptionsdirectives for a single directory are now merged together. The result of: --<Directory /foo> +<Directory /foo> IndexOptions HTMLTable IndexOptions SuppressColumnsorting -</Directory> -+</Directory>will be the equivalent of
-- IndexOptions HTMLTable SuppressColumnsorting -+IndexOptions HTMLTable SuppressColumnsorting-IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing+
-IndexOptions +SuppressSize -IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
+IndexOptions +SuppressSizeThe net effect is equivalent to
IndexOptions FancyIndexing @@ -998,9 +960,7 @@ Name|Date|Size|DescriptionThe
-IndexStyleSheetdirective sets the name of the file that will be used as the CSS for the index listing.- IndexStyleSheet "/css/style.css" -+IndexStyleSheet "/css/style.css"Using this directive in conjunction with
-IndexOptions @@ -1041,16 +1001,12 @@ of the index listing relative to theDocumentRoot.-# Example 1 -ReadmeName FOOTER.html -+# Example 1 +ReadmeName FOOTER.html--# Example 2 -ReadmeName /include/FOOTER.html -+# Example 2 +ReadmeName /include/FOOTER.htmlSee also
-HeaderName, where this behavior is described in greater diff --git a/docs/manual/mod/mod_autoindex.html.fr b/docs/manual/mod/mod_autoindex.html.fr index 7e1b90787f..34b9562812 100644 --- a/docs/manual/mod/mod_autoindex.html.fr +++ b/docs/manual/mod/mod_autoindex.html.fr @@ -232,10 +232,8 @@ fichier en fonction de son nom peut pas afficher d'images, si le chargement d'images est désactivé ou si l'icône ne peut pas être trouvé.-AddAlt "PDF file" *.pdf -AddAlt Compressed *.gz *.zip *.Z -+AddAlt "PDF file" *.pdf +AddAlt Compressed *.gz *.zip *.Z- AddAltByEncoding gzip x-gzip -+AddAltByEncoding gzip x-gzip- AddAltByType 'Fichier texte' text/plain -+AddAltByType 'Fichier texte' text/plain"). --AddDescription "The planet Mars" mars.gif -AddDescription "My friend Marshall" friends/mars.gif -+AddDescription "The planet Mars" mars.gif +AddDescription "My friend Marshall" friends/mars.gifLa taille par défaut, habituelle du champ de description est de @@ -391,12 +383,10 @@ nom et n'est donc pas nécessaire si vous utilisez
-IndexOptions HTMLTable.-#Examples +#Examples AddIcon (IMG,/icons/image.png) .gif .jpg .png AddIcon /icons/dir.png ^^DIRECTORY^^ -AddIcon /icons/backup.png *~ -+AddIcon /icons/backup.png *~Lorsque c'est possible, il est préférable d'utiliser
AddIconByTypeplutôt que @@ -427,9 +417,7 @@ codage MIMEcodage MIME doit être un codage valide, comme
-x-compress.- AddIconByEncoding /icons/compress.png x-compress -+AddIconByEncoding /icons/compress.png x-compresstype MIME est une expression avec caractères génériques représentant le type MIME.
-- AddIconByType (IMG,/icons/image.png) image/* -+AddIconByType (IMG,/icons/image.png) image/*- DefaultIcon /icon/unknown.png -+DefaultIcon /icon/unknown.png- HeaderName HEADER.html -+HeaderName HEADER.html@@ -515,9 +497,7 @@ contenant l'index considéré comme relatif au répertoire défini par la directive@@ -598,9 +574,7 @@ de l'index d'un r ignorer. Par défaut, la liste contientDocumentRoot. -- HeaderName /include/HEADER.html -+HeaderName /include/HEADER.htmlnom fichier doit correspondre à un document dont le @@ -528,9 +508,7 @@ contenant l'index sortie) est marqué comme
-text/htmlpar exemple à l'aide d'une directive comme :- AddType text/html .cgi -+AddType text/html .cgi-- IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">" -+IndexHeadInsert "<link rel=\"sitemap\" href=\"/sitemap.html\">".(le répertoire courant). -- IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t -+IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,tExpressions rationnelles
@@ -627,15 +601,13 @@ contenu d'un rIndexIgnoreet héritée par ailleurs d'autres sections de configuration. --<Directory /var/www> +<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>Revoyez la configuration par défaut pour une @@ -687,9 +659,7 @@ r système de fichiers sous-jacent utilise les noms de fichiers en Unicode ou non). -
- IndexOptions Charset=UTF-8 -+IndexOptions Charset=UTF-8@@ -920,9 +890,7 @@ r MIME de la page générée. La valeur par défaut est text/html. -- IndexOptions Type=text/plain -+IndexOptions Type=text/plain@@ -975,19 +943,15 @@ r apparaissant dans la même section directory sont maintenant fusionnées. Le résultat de : --<Directory /foo> +<Directory /foo> IndexOptions HTMLTable IndexOptions SuppressColumnsorting -</Directory> -+</Directory>est équivalent à
-- IndexOptions HTMLTable SuppressColumnsorting -+IndexOptions HTMLTable SuppressColumnsorting@@ -1004,10 +968,8 @@ r définition incrémentale. Considérons l'exemple suivant : --IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing+
-IndexOptions +SuppressSize -IndexOptions +ScanHTMLTitles -IconsAreLinks FancyIndexing
+IndexOptions +SuppressSizeL'effet global est équivalent à l'effet qu'aurait provoqué @@ -1076,9 +1038,7 @@ r définir le nom du fichier qui servira de feuille de style CSS pour l'index.
-- IndexStyleSheet "/css/style.css" -+IndexStyleSheet "/css/style.css"L'utilisation de cette directive en conjonction avec
-IndexOptions @@ -1126,16 +1086,12 @@ l'index comme relatif au répertoire défini par la directiveDocumentRoot.-# Example 1 -ReadmeName FOOTER.html -+# Example 1 +ReadmeName FOOTER.html--# Example 2 -ReadmeName /include/FOOTER.html -+# Example 2 +ReadmeName /include/FOOTER.htmlVoir aussi la directive
-HeaderName, où cette fonctionnalité est décrite plus en diff --git a/docs/manual/mod/mod_autoindex.html.tr.utf8 b/docs/manual/mod/mod_autoindex.html.tr.utf8 index f5677f91eb..6c85cd5cb0 100644 --- a/docs/manual/mod/mod_autoindex.html.tr.utf8 +++ b/docs/manual/mod/mod_autoindex.html.tr.utf8 @@ -163,8 +163,7 @@ yaptığı gibi dizin içeriÄŸini listeler.mod_autoindextarafından son argüman olarak ele alınacak ve çözümleme iÅŸlemi o noktada duracaktır.-<form action="" method="get"> +<form action="" method="get"> <input type="text" name="P" value="*" /> ile eÅŸleÅŸen <select name="C"> <option value="N" selected="selected">isme</option> diff --git a/docs/manual/mod/mod_buffer.html.en b/docs/manual/mod/mod_buffer.html.en index 31c6b9317b..8cca87c4d3 100644 --- a/docs/manual/mod/mod_buffer.html.en +++ b/docs/manual/mod/mod_buffer.html.en @@ -58,9 +58,7 @@AddOutputFilterorAddOutputFilterByTypedirectives. -diff --git a/docs/manual/mod/mod_cern_meta.html.en b/docs/manual/mod/mod_cern_meta.html.en index e3d42b2867..710afdbdff 100644 --- a/docs/manual/mod/mod_cern_meta.html.en +++ b/docs/manual/mod/mod_cern_meta.html.en @@ -119,9 +119,7 @@ meta information will use its contents to generate additional MIME header information. -Using buffer with mod_include
- AddOutputFilterByType INCLUDES;BUFFER text/html -+Using buffer with mod_include
AddOutputFilterByType INCLUDES;BUFFER text/htmlThe buffer filters read the request/response into diff --git a/docs/manual/mod/mod_buffer.html.fr b/docs/manual/mod/mod_buffer.html.fr index ea5fa42992..5276befae3 100644 --- a/docs/manual/mod/mod_buffer.html.fr +++ b/docs/manual/mod/mod_buffer.html.fr @@ -60,9 +60,7 @@ d'Apache directives@@ -254,9 +242,7 @@ Apache manière excessive dans le cas où les données arriveraient plus vite que prévu. -SetInputFilter,SetOutputFilter,AddOutputFilterouAddOutputFilterByType. -@@ -219,9 +209,7 @@ Apache stockées dans le cache, et non lorsqu'elles sont servies depuis le cache. -Utilisation d'un tampon avec mod_include
- AddOutputFilterByType INCLUDES;BUFFER text/html -+Utilisation d'un tampon avec mod_include
AddOutputFilterByType INCLUDES;BUFFER text/htmlLes filtres de mise en tampon lisent la diff --git a/docs/manual/mod/mod_cache.html.en b/docs/manual/mod/mod_cache.html.en index 05c40d5394..ed17c8d1db 100644 --- a/docs/manual/mod/mod_cache.html.en +++ b/docs/manual/mod/mod_cache.html.en @@ -169,8 +169,7 @@@@ -186,9 +178,7 @@ Apache pour une durée égale à sa durée de fraîcheur, elle n'a pas besoin d'être rafraîchie. -Sample Configuration
-Sample httpd.conf
-# +Sample httpd.conf
# # Sample Cache Configuration # LoadModule cache_module modules/mod_cache.so @@ -185,8 +184,7 @@ LoadModule cache_module modules/mod_cache.so # When acting as a proxy, don't cache the list of security updates CacheDisable http://security.update.server/update-list/ -</IfModule> -+</IfModule>@@ -239,16 +237,14 @@ LoadModule cache_module modules/mod_cache.so@@ -161,9 +155,7 @@ Apache le cache avant péremption. Cette définition l'emporte sur la durée de fraîcheur définie pour le document par le protocole HTTP. -Example configuration
-@@ -282,11 +278,9 @@ LoadModule cache_module modules/mod_cache.so place the CACHE filter before the DEFLATE filter as in the example below: -Enabling the cache lock
-# +Enabling the cache lock
# # Enable the cache lock # <IfModule mod_cache.c> CacheLock on CacheLockPath /tmp/mod_cache-lock CacheLockMaxAge 5 -</IfModule> -+</IfModule>-# Cache content before optional compression +# Cache content before optional compression CacheQuickHandler off -AddOutputFilterByType CACHE;DEFLATE text/plain -+AddOutputFilterByType CACHE;DEFLATE text/plainAnother option is to have content cached before personalisation is applied @@ -294,11 +288,9 @@ AddOutputFilterByType CACHE;DEFLATE text/plain example templates containing tags understood by
-mod_includeare cached before being parsed:-# Cache content before mod_include and mod_deflate +# Cache content before mod_include and mod_deflate CacheQuickHandler off -AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html -+AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/htmlYou may place the CACHE filter anywhere you wish within the @@ -306,11 +298,9 @@ AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
-mod_include, but before being processed bymod_deflate:-# Cache content between mod_include and mod_deflate +# Cache content between mod_include and mod_deflate CacheQuickHandler off -AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html -+AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html@@ -408,10 +392,8 @@ CustomLog invalidated-requests.log common env=cache-invalidate is used, this directive must appear within a server or virtual host context, otherwise the setting will be ignored. -Warning:
If the location of the @@ -329,9 +319,7 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/htmlLogFormatdirective as follows: -- LogFormat "%{cache-status}e ..." -+LogFormat "%{cache-status}e ..."Based on the caching decision made, the reason is also written to the @@ -349,12 +337,10 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html
This makes it possible to support conditional logging of cached requests as per the following example:
--CustomLog cached-requests.log common env=cache-hit +CustomLog cached-requests.log common env=cache-hit CustomLog uncached-requests.log common env=cache-miss CustomLog revalidated-requests.log common env=cache-revalidate -CustomLog invalidated-requests.log common env=cache-invalidate -+CustomLog invalidated-requests.log common env=cache-invalidateFor module authors, a hook called cache_status is available, @@ -376,9 +362,7 @@ CustomLog invalidated-requests.log common env=cache-invalidate with the document. The value specified with the
-CacheMaxExpiredirective does not override this setting.- CacheDefaultExpire 86400 -+CacheDefaultExpire 86400-# Enable the X-Cache-Detail header -CacheDetailHeader on -+# Enable the X-Cache-Detail header +CacheDetailHeader ondiff --git a/docs/manual/mod/mod_cache_socache.html.fr b/docs/manual/mod/mod_cache_socache.html.fr index ac1a9eb0dd..7188d4faf2 100644 --- a/docs/manual/mod/mod_cache_socache.html.fr +++ b/docs/manual/mod/mod_cache_socache.html.fr @@ -47,8 +47,7 @@ stockées simultanément ; cependant, la mise en cache de contenus partiels n'est pas encore supportée par ce module. --
@@ -433,20 +415,16 @@ CacheDetailHeader onmod_cacheto not cache urls at or below url-string.@@ -241,9 +229,7 @@ cache to ensure that the server does not buffer excessively should data arrive faster than expected. -Example
- CacheDisable /local_files -+Example
CacheDisable /local_filesIf used in a
-<Location>directive, the path needs to be specified below the Location, or if the word "on" is used, caching for the whole location will be disabled.@@ -208,9 +198,7 @@ cacheExample
-<Location /foo> +Example
<Location /foo> CacheDisable on -</Location> -+</Location>The
no-cacheenvironment variable can be set to @@ -498,8 +476,7 @@ managerWhen acting as a forward proxy server, url-string must minimally begin with a protocol for which caching should be enabled.
--# Cache content (normal handler only) +# Cache content (normal handler only) CacheQuickHandler off <Location /foo> CacheEnable disk @@ -518,20 +495,17 @@ CacheEnable disk / CacheEnable disk ftp:// # Cache forward proxy content from www.example.org (normal or quick handler) -CacheEnable disk http://www.example.org/ -+CacheEnable disk http://www.example.org/A hostname starting with a "*" matches all hostnames with that suffix. A hostname starting with "." matches all hostnames containing the domain components that follow.
--# Match www.example.org, and fooexample.org +# Match www.example.org, and fooexample.org CacheEnable disk http://*example.org/ # Match www.example.org, but not fooexample.org -CacheEnable disk http://.example.org/ -+CacheEnable disk http://.example.org/The
no-cacheenvironment variable can be set to @@ -572,15 +546,11 @@ CacheEnable disk http://.example.org/ server and was not served from cache. --# Enable the X-Cache header -CacheHeader on -+# Enable the X-Cache header +CacheHeader on-- X-Cache: HIT from localhost -+X-Cache: HIT from localhost@@ -602,9 +572,7 @@ CacheHeader on tells the server to attempt to serve the resource from the cache even if the request contains no-cache header values. -- CacheIgnoreCacheControl On -+CacheIgnoreCacheControl On@@ -179,9 +171,7 @@ cache only stored for its freshness lifetime, there will be no opportunity to revalidate the response to make it fresh again. -Warning:
@@ -656,14 +624,10 @@ CacheHeader on behaviour),CacheIgnoreHeaderscan be set toNone. -@@ -155,9 +149,7 @@ cache the cache. This value overrides the freshness lifetime defined for the document by the HTTP protocol. -Example 1
- CacheIgnoreHeaders Set-Cookie -+-Example 1
CacheIgnoreHeaders Set-Cookie@@ -1054,9 +992,7 @@ CacheStaleOnError on tells the server to attempt to cache the resource even if it contains no-store header values. -Example 2
- CacheIgnoreHeaders None -+Example 2
CacheIgnoreHeaders None@@ -721,9 +683,7 @@ header. view the request is treated as if having no query string when this directive is enabled. -Warning:
@@ -696,9 +660,7 @@ header.CacheDefaultExpiredirective will be used to generate an expiration date. -- CacheIgnoreNoLastMod On -+CacheIgnoreNoLastMod On- CacheIgnoreQueryString On -+CacheIgnoreQueryString On@@ -755,14 +715,10 @@ header.-
CacheIgnoreURLSessionIdentifiers Noneclears the list of ignored identifiers. Otherwise, each identifier is added to the list.@@ -963,10 +909,8 @@ CacheLock on slower than the default, it allows the cache to be used in cases where full processing is required, such as when content is subject to authorization. -Example 1
- CacheIgnoreURLSessionIdentifiers jsessionid -+-Example 1
CacheIgnoreURLSessionIdentifiers jsessionid@@ -932,9 +880,7 @@ CacheLock on server. This is only used if no valid expire time was supplied with the document. -Example 2
- CacheIgnoreURLSessionIdentifiers None -+@@ -786,10 +742,8 @@ header. should be cached beneath the same cache key, a new base URL can be specified with this directive. -Example 2
CacheIgnoreURLSessionIdentifiers None-# Override the base URL of the cache key. -CacheKeyBaseURL http://www.example.com/ -+# Override the base URL of the cache key. +CacheKeyBaseURL http://www.example.com/Take care when setting this directive. If two separate virtual @@ -828,9 +782,7 @@ LastModified date.@@ -850,10 +802,8 @@ LastModified date.CacheMaxExpire, then the latter takes precedence. -- CacheLastModifiedFactor 0.5 -+CacheLastModifiedFactor 0.5In a minimal configuration the following directive is all that is needed to enable the thundering herd lock in the default run-time file directory.
--# Enable cache lock -CacheLock on -+# Enable cache lock +CacheLock onLocks consist of empty files that only exist for stale URLs in flight, so this @@ -911,9 +861,7 @@ CacheLock on server. Thus, documents will be out of date at most this number of seconds. This maximum value is enforced even if an expiry date was supplied with the document.
-- CacheMaxExpire 604800 -+CacheMaxExpire 604800- CacheMinExpire 3600 -+CacheMinExpire 3600-# Run cache as a normal handler -CacheQuickHandler off -+# Run cache as a normal handler +CacheQuickHandler offIt is also possible, when the quick handler is disabled, for the @@ -974,11 +918,9 @@ CacheQuickHandler off caching is to be performed, by adding the CACHE filter to the chain.
--# Cache content before mod_include and mod_deflate +# Cache content before mod_include and mod_deflate CacheQuickHandler off -AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html -+AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/htmlIf the CACHE filter is specified more than once, the last instance will @@ -1004,10 +946,8 @@ AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html and the raw 5xx responses returned to the client on request, the 5xx response so returned to the client will not invalidate the content in the cache.
--# Serve stale data on error. -CacheStaleOnError on -+# Serve stale data on error. +CacheStaleOnError on@@ -1031,9 +971,7 @@ CacheStaleOnError on the origin server, and the response may be fulfilled from cache if the backend resource has not changed. -- CacheStoreExpired On -+CacheStoreExpired On- CacheStoreNoStore On -+CacheStoreNoStore Ondiff --git a/docs/manual/mod/mod_cache_socache.html.en b/docs/manual/mod/mod_cache_socache.html.en index 7c6d3a1a24..d15ea2e4c5 100644 --- a/docs/manual/mod/mod_cache_socache.html.en +++ b/docs/manual/mod/mod_cache_socache.html.en @@ -46,8 +46,7 @@ HTTP caching filter. however the caching of partial content is not yet supported by this module. -Warning:
@@ -1089,9 +1025,7 @@ CacheStaleOnError on tells the server to attempt to cache the resource even if it contains private header values. -- CacheStorePrivate On -+CacheStorePrivate OnWarning:
diff --git a/docs/manual/mod/mod_cache.html.fr b/docs/manual/mod/mod_cache.html.fr index 5a642be1fe..657aefcba0 100644 --- a/docs/manual/mod/mod_cache.html.fr +++ b/docs/manual/mod/mod_cache.html.fr @@ -180,8 +180,7 @@ cache@@ -279,9 +271,7 @@ seront stock définir la structure des sous-répertoires du répertoire racine spécifié. -Exemple de configuration
-Extrait de httpd.conf
-# +Extrait de httpd.conf
# # Exemple de configuration du cache # LoadModule cache_module modules/mod_cache.so @@ -197,8 +196,7 @@ LoadModule cache_module modules/mod_cache.so # Lorsqu'on sert de mandataire, on ne met pas en cache la liste # des mises à jour de sécurité CacheDisable http://security.update.server/update-list/ -</IfModule> -+</IfModule>@@ -263,16 +261,14 @@ LoadModule cache_module modules/mod_cache.so@@ -253,9 +247,7 @@ avant d'envoyer les donn que le serveur n'effectue pas une mise en tampon excessive au cas où les données arriveraient plus vite que prévu. -Exemple de configuration
-@@ -311,11 +307,9 @@ LoadModule cache_module modules/mod_cache.so avant le filtre DEFLATE comme dans l'exemple suivant : -Activation du verrouillage du cache
-# +Activation du verrouillage du cache
# # Active le verrouillage du cache # <IfModule mod_cache.c> CacheLock on CacheLockPath /tmp/mod_cache-lock CacheLockMaxAge 5 -</IfModule> -+</IfModule>-# Mise en cache du contenu avant la compression optionnelle +# Mise en cache du contenu avant la compression optionnelle CacheQuickHandler off -AddOutputFilterByType CACHE;DEFLATE text/plain -+AddOutputFilterByType CACHE;DEFLATE text/plainUne autre possibilité consiste à mettre en cache le contenu avant @@ -325,12 +319,10 @@ AddOutputFilterByType CACHE;DEFLATE text/plain
-mod_includesont mis en cache avant d'être interprétés :-# Mise en cache du contenu avant l'intervention de mod_include et +# Mise en cache du contenu avant l'intervention de mod_include et # mod_deflate CacheQuickHandler off -AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html -+AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/htmlVous pouvez insérer le filtre CACHE en tout point @@ -338,12 +330,10 @@ AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html en cache après avoir été interprété par
-mod_include, mais avant d'être traité parmod_deflate:-# Mise en cache du contenu entre les interventions de mod_include et +# Mise en cache du contenu entre les interventions de mod_include et # mod_deflate CacheQuickHandler off -AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html -+AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html@@ -452,10 +436,8 @@ lorsqu'aucune date d'expiration n'a rapide qui est utilisé, elle doit se situer dans un contexte de serveur principal ou de serveur virtuel, sinon elle sera ignorée. -Avertissement :
Si pour une raison @@ -362,9 +352,7 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html interne à la requête sous la clé cache-status. Cette information peut être journalisée via la directiveLogFormatcomme suit : -- LogFormat "%{cache-status}e ..." -+LogFormat "%{cache-status}e ..."En fonction de la décision prise, l'information est aussi écrite @@ -385,12 +373,10 @@ AddOutputFilterByType INCLUDES;CACHE;DEFLATE text/html du traitement des requêtes par rapport au cache comme dans l'exemple suivant :
--CustomLog cached-requests.log common env=cache-hit +CustomLog cached-requests.log common env=cache-hit CustomLog uncached-requests.log common env=cache-miss CustomLog revalidated-requests.log common env=cache-revalidate -CustomLog invalidated-requests.log common env=cache-invalidate -+CustomLog invalidated-requests.log common env=cache-invalidatePour les concepteurs de modules, une accroche (hook) nommée @@ -418,9 +404,7 @@ lorsqu'aucune date d'expiration n'a
-CacheMaxExpiresi cette dernière est utilisée.- CacheDefaultExpire 86400 -+CacheDefaultExpire 86400-# Active l'en-tête X-Cache-Detail -CacheDetailHeader on -+# Active l'en-tête X-Cache-Detail +CacheDetailHeader on@@ -220,9 +216,7 @@ mettre en cache avant de les envoyer au client enregistrées dans le cache, et non lorsque les données sont servies à partir du cache. --
@@ -479,9 +461,7 @@ sp spécifiée par chaîne URL, ainsi que les URLs de niveaux inférieurs.@@ -189,9 +187,7 @@ cache. définir la taille minimale d'un document, en octets, pour que celui-ci puisse faire l'objet d'un stockage dans le cache. -Exemple
- CacheDisable /fichiers_locaux -+Exemple
CacheDisable /fichiers_locauxSi la directive se trouve à l'intérieur d'une section
-<Location>, le chemin doit être spécifié en @@ -489,11 +469,9 @@ sp cache sera désactivée pour l'ensemble de l'arborescence concernée par la section Location.diff --git a/docs/manual/mod/mod_cache_disk.html.fr b/docs/manual/mod/mod_cache_disk.html.fr index 68506fc805..f65c3c2767 100644 --- a/docs/manual/mod/mod_cache_disk.html.fr +++ b/docs/manual/mod/mod_cache_disk.html.fr @@ -168,9 +168,7 @@ cache. définir la taille maximale d'un document, en octets, pour que celui-ci puisse faire l'objet d'un stockage dans le cache. -Exemple
-<Location /foo> +Exemple
<Location /foo> CacheDisable on -</Location> -+</Location>Avec les versions 2.2.12 et ultérieures, on peut définir la @@ -551,8 +529,7 @@ en mandat direct dans les versions 2.2 et ant URL doit au moins débuter par un protocole pour lequel la mise en cache doit être activée.
--# Mise en cache de contenu (gestionnaire normal seulement) +# Mise en cache de contenu (gestionnaire normal seulement) CacheQuickHandler off <Location /foo> CacheEnable disk @@ -572,8 +549,7 @@ CacheEnable disk / CacheEnable disk ftp:// # Mise en cache des contenus mandatés en direct depuis www.example.org (gestionnaire normal ou rapide) -CacheEnable disk http://www.example.org/ -+CacheEnable disk http://www.example.org/Un nom d'hôte commençant par un caractère "*" @@ -582,12 +558,10 @@ CacheEnable disk http://www.example.org/ "." correspondra à tout nom d'hôte contenant le composant de nom de domaine qui suit ce caractère.
--# Correspond à www.example.org et fooexample.org +# Correspond à www.example.org et fooexample.org CacheEnable disk http://*example.org/ # Correspond à www.example.org, mais pas à fooexample.org -CacheEnable disk http://.example.org/ -+CacheEnable disk http://.example.org/Depuis la version 2.2.12, on peut définir la variable @@ -632,15 +606,11 @@ Apache depuis le cache, mais directement depuis le serveur demandé. -
-# Active l'en-tête X-Cache -CacheHeader on -+# Active l'en-tête X-Cache +CacheHeader on-- X-Cache: HIT from localhost -+X-Cache: HIT from localhost@@ -666,9 +636,7 @@ le contenu au client depuis le cache cache, même si la requête contient un en-tête no-cache. -- CacheIgnoreCacheControl On -+CacheIgnoreCacheControl On@@ -261,9 +253,7 @@ stored a configuration file processing error. TheAvertissement :
@@ -724,14 +692,10 @@ le contenu au client depuis le cacheCacheIgnoreHeaderspeut être définie àNone. -@@ -238,9 +232,7 @@ cache ensure that the server does not buffer excessively should data arrive faster than expected. -Exemple 1
- CacheIgnoreHeaders Set-Cookie -+-Exemple 1
CacheIgnoreHeaders Set-Cookie@@ -206,9 +202,7 @@ cacheExemple 2
- CacheIgnoreHeaders None -+Exemple 2
CacheIgnoreHeaders None@@ -796,9 +758,7 @@ cache traitée comme si elle ne possèdait pas de chaîne de paramètres lorsque cette directive est activée. -Avertissement :
@@ -767,9 +731,7 @@ Modified. d'expiration. -- CacheIgnoreNoLastMod On -+CacheIgnoreNoLastMod On- CacheIgnoreQueryString On -+CacheIgnoreQueryString On@@ -835,14 +795,10 @@ l'URL lors de la mise en cache des identifiants ignorés. Autrement, chaque identifiant spécifié est ajouté à la liste. -@@ -178,9 +176,7 @@ cache minimum size, in bytes, for a document to be considered for storage in the cache. -Exemple 1
- CacheIgnoreURLSessionIdentifiers jsessionid -+-Exemple 1
CacheIgnoreURLSessionIdentifiers jsessionid@@ -1065,10 +1011,8 @@ document traitement complet de la requête est nécessaire, comme par exemple lorsque le contenu est soumis à autorisation. -Exemple 2
- CacheIgnoreURLSessionIdentifiers None -+@@ -867,10 +823,8 @@ inverse machines, si toutes les entrées du cache doivent posséder la même clé, cette directive permet de spécifier une nouvelle URL de base. -Exemple 2
CacheIgnoreURLSessionIdentifiers None-# Remplace l'URL de base de la clé de cache. -CacheKeyBaseURL http://www.example.com/ -+# Remplace l'URL de base de la clé de cache. +CacheKeyBaseURL http://www.example.com/Prenez garde en définissant cette directive. Si @@ -912,9 +866,7 @@ fonction de la date de derni directive@@ -936,10 +888,8 @@ fonction de la date de derni défaut des fichiers run-time est la suivante : -CacheMaxExpire, c'est ce dernier qui l'emporte. -- CacheLastModifiedFactor 0.5 -+CacheLastModifiedFactor 0.5-# Active le verrouillage du cache -CacheLock on -+# Active le verrouillage du cache +CacheLock onLes verrous sont des fichiers vides qui n'existent que pour les @@ -1005,9 +955,7 @@ document sera pas à jour. L'utilisation de cette valeur maximale est forcée, même si le document possède une date d'expiration.
-- CacheMaxExpire 604800 -+CacheMaxExpire 604800@@ -1030,9 +978,7 @@ document que dans le cas où le document ne possède aucune date d'expiration valide. -- CacheMinExpire 3600 -+CacheMinExpire 3600-# Exécute le cache comme un gestionnaire normal -CacheQuickHandler off -+# Exécute le cache comme un gestionnaire normal +CacheQuickHandler offLorsque le gestionnaire rapide est désactivé, l'administrateur a @@ -1076,12 +1020,10 @@ CacheQuickHandler off de filtrage où la mise en cache sera effectuée, en utilisant le filtre CACHE.
--# Mise en cache du contenu avant l'intervention de mod_include et +# Mise en cache du contenu avant l'intervention de mod_include et # mod_deflate CacheQuickHandler off -AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html -+AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/htmlSi le filtre CACHE est spécifié plusieurs fois, c'est la dernière @@ -1109,10 +1051,8 @@ AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html réponse 5xx renvoyée au client n'invalidera pas le contenu dans le cache.
--# Sert des données non mises à jour en cas d'erreur. -CacheStaleOnError on -+# Sert des données non mises à jour en cas d'erreur. +CacheStaleOnError on@@ -1137,9 +1077,7 @@ consid de la part du serveur d'origine, et la réponse sera renvoyée à partir du cache si la ressource d'arrière-plan n'a pas été modifiée. -- CacheStoreExpired On -+CacheStoreExpired On@@ -1164,9 +1102,7 @@ l'ent un en-tête no-store. -- CacheStoreNoStore On -+CacheStoreNoStore On@@ -1206,9 +1142,7 @@ marqu contient un en-tête private. -- CacheStorePrivate On -+CacheStorePrivate Ondiff --git a/docs/manual/mod/mod_cache_disk.html.en b/docs/manual/mod/mod_cache_disk.html.en index ccf2aff750..8f23545cc5 100644 --- a/docs/manual/mod/mod_cache_disk.html.en +++ b/docs/manual/mod/mod_cache_disk.html.en @@ -157,9 +157,7 @@ cache maximum size, in bytes, for a document to be considered for storage in the cache. -- CacheMaxFileSize 64000 -+CacheMaxFileSize 64000- CacheMinFileSize 64 -+CacheMinFileSize 64This directive only takes effect when the data is being saved to the cache, as opposed to data being served from the cache.
-- CacheReadSize 102400 -+CacheReadSize 102400- CacheReadTime 1000 -+CacheReadTime 1000CacheDirLevelsandCacheDirLengthdirectives define the structure of the directories under the specified root directory. -- CacheRoot c:/cacheroot -+CacheRoot c:/cacheroot- CacheMaxFileSize 64000 -+CacheMaxFileSize 64000- CacheMinFileSize 64 -+CacheMinFileSize 64- CacheReadSize 102400 -+CacheReadSize 102400- CacheReadTime 1000 -+CacheReadTime 1000- CacheRoot c:/cacheroot -+CacheRoot c:/cacheroot-# Turn on caching +# Turn on caching CacheSocache shmcb CacheSocacheMaxSize 102400 <Location /foo> @@ -60,8 +59,7 @@ CacheSocacheMaxSize 102400 <Location /foo> CacheEnable socache CacheEnable disk -</Location> -+</Location>@@ -132,9 +128,7 @@ cache responses larger than those cacheable withinNote:
@@ -102,9 +100,7 @@ CacheSocacheMaxSize 102400 implementations of shared object caches are available to choose from. -- CacheSocache shmcb -+CacheSocache shmcbmod_cache_socache. -- CacheSocacheMaxSize 102400 -+CacheSocacheMaxSize 102400- CacheSocacheMaxTime 86400 -+CacheSocacheMaxTime 86400- CacheSocacheMinTime 600 -+CacheSocacheMinTime 600This directive only takes effect when the data is being saved to the cache, as opposed to data being served from the cache.
-- CacheReadSize 102400 -+CacheReadSize 102400- CacheSocacheReadTime 1000 -+CacheSocacheReadTime 1000-# Activation de la mise en cache +# Activation de la mise en cache CacheSocache shmcb CacheSocacheMaxSize 102400 <Location /foo> @@ -61,8 +60,7 @@ CacheSocacheMaxSize 102400 <Location /foo> CacheEnable socache CacheEnable disk -</Location> -+</Location>@@ -137,9 +133,7 @@ Apache la taille est trop importante pour pouvoir être mises en cache parNote :
@@ -104,9 +102,7 @@ Apache possible de choisir entre plusieurs implémentations de caches d'objets partagés. -- CacheSocache shmcb -+CacheSocache shmcbmod_cache_socache. -- CacheSocacheMaxSize 102400 -+CacheSocacheMaxSize 102400- CacheSocacheMaxTime 86400 -+CacheSocacheMaxTime 86400- CacheSocacheMinTime 600 -+CacheSocacheMinTime 600- CacheReadSize 102400 -+CacheReadSize 102400- CacheSocacheReadTime 1000 -+CacheSocacheReadTime 1000diff --git a/docs/manual/mod/mod_cern_meta.html.fr b/docs/manual/mod/mod_cern_meta.html.fr index b65128c3ae..efa3772b17 100644 --- a/docs/manual/mod/mod_cern_meta.html.fr +++ b/docs/manual/mod/mod_cern_meta.html.fr @@ -124,9 +124,7 @@ style du CERN son contenu pour générer les informations quant aux en-têtes MIME additionnels. -Example:
- MetaSuffix .meta -+Example:
MetaSuffix .metadiff --git a/docs/manual/mod/mod_cgi.html.en b/docs/manual/mod/mod_cgi.html.en index 2883cea1b0..afd65139a1 100644 --- a/docs/manual/mod/mod_cgi.html.en +++ b/docs/manual/mod/mod_cgi.html.en @@ -178,9 +178,7 @@ taken relative to theExemple :
- MetaSuffix .meta -+Exemple :
MetaSuffix .metaServerRoot. -Example
- ScriptLog logs/cgi_log -+Example
ScriptLog logs/cgi_logThis log will be opened as the user the child processes run diff --git a/docs/manual/mod/mod_cgi.html.fr b/docs/manual/mod/mod_cgi.html.fr index f1a7c3c0a5..8da611652d 100644 --- a/docs/manual/mod/mod_cgi.html.fr +++ b/docs/manual/mod/mod_cgi.html.fr @@ -190,9 +190,7 @@ CGI répertoire défini par la directive
-ServerRoot.Exemple
- ScriptLog logs/cgi_log -+Exemple
ScriptLog logs/cgi_logCe journal sera ouvert par l'utilisateur sous lequel les diff --git a/docs/manual/mod/mod_cgid.html.en b/docs/manual/mod/mod_cgid.html.en index f4f81a3172..dd4b9c7000 100644 --- a/docs/manual/mod/mod_cgid.html.en +++ b/docs/manual/mod/mod_cgid.html.en @@ -93,9 +93,7 @@ unset the CGI program. If the time is exceeded, the request and CGI are terminated.
-Example
- CGIDScriptTimeout 20 -+@@ -123,9 +121,7 @@ the cgi daemon will be relative to the value ofExample
CGIDScriptTimeout 20DefaultRuntimeDir. -Example
- ScriptSock /var/run/cgid.sock -+diff --git a/docs/manual/mod/mod_cgid.html.fr b/docs/manual/mod/mod_cgid.html.fr index 0853deba0f..84c710300c 100644 --- a/docs/manual/mod/mod_cgid.html.fr +++ b/docs/manual/mod/mod_cgid.html.fr @@ -97,9 +97,7 @@ programme CGI reçues en sortie du programme CGI. Si ce temps est dépassé, la requête et le programme CGI se terminent. -Example
ScriptSock /var/run/cgid.sockExemple
- CGIDScriptTimeout 20 -+@@ -127,9 +125,7 @@ communiquer avec le dExemple
CGIDScriptTimeout 20Si chemin fichier n'est pas un chemin absolu, il est relatif au chemin défini par la directive
-DefaultRuntimeDir.Exemple
- ScriptSock /var/run/cgid.sock -+diff --git a/docs/manual/mod/mod_charset_lite.html.en b/docs/manual/mod/mod_charset_lite.html.en index d7f851bbc7..1425313d09 100644 --- a/docs/manual/mod/mod_charset_lite.html.en +++ b/docs/manual/mod/mod_charset_lite.html.en @@ -115,12 +115,10 @@ APR. Generally, this means that it must be supported by iconv. -Exemple
ScriptSock /var/run/cgid.sockExample
-<Directory /export/home/trawick/apacheinst/htdocs/convert> +Example
<Directory /export/home/trawick/apacheinst/htdocs/convert> CharsetSourceEnc UTF-16BE CharsetDefault ISO-8859-1 -</Directory> -+</Directory>@@ -185,12 +183,10 @@ APR. Generally, this means that it must be supported by iconv. -Example
-<Directory /export/home/trawick/apacheinst/htdocs/convert> +Example
<Directory /export/home/trawick/apacheinst/htdocs/convert> CharsetSourceEnc UTF-16BE CharsetDefault ISO-8859-1 -</Directory> -+</Directory>The character set names in this example work with the iconv diff --git a/docs/manual/mod/mod_charset_lite.html.fr b/docs/manual/mod/mod_charset_lite.html.fr index c7cc2ab747..06cef58726 100644 --- a/docs/manual/mod/mod_charset_lite.html.fr +++ b/docs/manual/mod/mod_charset_lite.html.fr @@ -122,12 +122,10 @@ s'effectuer jeux de caractères dans APR. En général, cela implique qu'elle doit être reconnue par iconv.
-Exemple
-<Directory /export/home/trawick/apacheinst/htdocs/convert> +Exemple
<Directory /export/home/trawick/apacheinst/htdocs/convert> CharsetSourceEnc UTF-16BE CharsetDefault ISO-8859-1 -</Directory> -+</Directory>@@ -199,12 +197,10 @@ caract jeux de caractères dans APR. En général, cela implique qu'elle doit être reconnue par iconv. -Exemple
-<Directory /export/home/trawick/apacheinst/htdocs/convert> +Exemple
<Directory /export/home/trawick/apacheinst/htdocs/convert> CharsetSourceEnc UTF-16BE CharsetDefault ISO-8859-1 -</Directory> -+</Directory>Les noms de jeux de caractères de cet exemple sont reconnus par diff --git a/docs/manual/mod/mod_data.html.en b/docs/manual/mod/mod_data.html.en index 7c237cf6dc..ebed139a5d 100644 --- a/docs/manual/mod/mod_data.html.en +++ b/docs/manual/mod/mod_data.html.en @@ -59,11 +59,9 @@ or any of the directives supported by the
-mod_filtermodule.diff --git a/docs/manual/mod/mod_data.html.fr b/docs/manual/mod/mod_data.html.fr index a4b8e83820..41de087808 100644 --- a/docs/manual/mod/mod_data.html.fr +++ b/docs/manual/mod/mod_data.html.fr @@ -59,11 +59,9 @@ pile des filtres via la directiveConfiguring the filter
-<Location /data/images> +Configuring the filter
<Location /data/images> SetOutputFilter DATA -</Location> -+</Location>SetOutputFilter, ou toute autre directive supportée par le modulemod_filter. -diff --git a/docs/manual/mod/mod_dav.html.en b/docs/manual/mod/mod_dav.html.en index 5663c17624..a6c0ce6470 100644 --- a/docs/manual/mod/mod_dav.html.en +++ b/docs/manual/mod/mod_dav.html.en @@ -78,9 +78,7 @@ file using theConfiguration du filtre
-<Location /data/images> +Configuration du filtre
<Location /data/images> SetOutputFilter DATA -</Location> -+</Location>DavLockDBdirective: -- DavLockDB /usr/local/apache2/var/DavLock -+DavLockDB /usr/local/apache2/var/DavLockThe directory containing the lock database file must be @@ -95,8 +93,7 @@ directive. The "normal"
-LimitRequestBodydirective has no effect on DAV requests.@@ -163,14 +159,12 @@ DavLockDB /usr/local/apache2/var/DavLock will run the script, and one of which will allow it to be downloaded and manipulated with DAV. -Full Example
-DavLockDB /usr/local/apache2/var/DavLock +Full Example
DavLockDB /usr/local/apache2/var/DavLock <Directory /usr/local/apache2/htdocs/foo> Require all granted @@ -109,8 +106,7 @@ DavLockDB /usr/local/apache2/var/DavLock <LimitExcept GET POST OPTIONS> Require user admin </LimitExcept> -</Directory> -+</Directory>-Alias /phparea /home/gstein/php_files +Alias /phparea /home/gstein/php_files Alias /php-source /home/gstein/php_files <Location /php-source> DAV On ForceType text/plain -</Location> -+</Location>With this setup,
http://example.com/phpareacan be @@ -191,11 +185,9 @@ Alias /php-source /home/gstein/php_filesUse the
-Davdirective to enable the WebDAV HTTP methods for the given container:-<Location /foo> +<Location /foo> Dav On -</Location> -+</Location>The value
-Onis actually an alias for the default @@ -248,11 +240,9 @@ a DAV resource (like 600 seconds) to reduce the chance of the client losing the lock due to network latency.diff --git a/docs/manual/mod/mod_dav.html.fr b/docs/manual/mod/mod_dav.html.fr index 1a0b33dcae..aa02dd949e 100644 --- a/docs/manual/mod/mod_dav.html.fr +++ b/docs/manual/mod/mod_dav.html.fr @@ -79,9 +79,7 @@ documents via le web (WebDAV) verrous DAV via une directiveExample
-<Location /MSWord> +Example
<Location /MSWord> DavMinTimeout 600 -</Location> -+</Location>DavLockDBdans la section globale de votre fichierhttpd.conf: -- DavLockDB /usr/local/apache2/var/DavLock -+DavLockDB /usr/local/apache2/var/DavLockLe répertoire contenant le fichier de la base de données des @@ -98,8 +96,7 @@ documents via le web (WebDAV) directive
-LimitRequestBody"habituelle" n'a aucune incidence sur les requêtes DAV.@@ -175,14 +171,12 @@ DavLockDB /usr/local/apache2/var/DavLock script, alors que l'autre peut être utilisée pour le télécharger et le manipuler avec DAV. -Exemple complet
-DavLockDB /usr/local/apache2/var/DavLock +Exemple complet
DavLockDB /usr/local/apache2/var/DavLock <Directory /usr/local/apache2/htdocs/foo> Require all granted @@ -112,8 +109,7 @@ DavLockDB /usr/local/apache2/var/DavLock <LimitExcept GET POST OPTIONS> Require user admin </LimitExcept> -</Directory> -+</Directory>-Alias /phparea /home/gstein/php_files +Alias /phparea /home/gstein/php_files Alias /php-source /home/gstein/php_files <Location /php-source> DAV On ForceType text/plain -</Location> -+</Location>Avec cette configuration, on peut utiliser @@ -204,11 +198,9 @@ ForceType text/plain
La directive
-Davactive les méthodes HTTP WebDAV pour le conteneur condidéré :-<Location /foo> +<Location /foo> Dav On -</Location> -+</Location>La valeur
-Onest en fait un alias vers le @@ -269,11 +261,9 @@ verrou sur une ressource DAV de perte du verrou par le client suite à une surcharge du réseau.diff --git a/docs/manual/mod/mod_dav_fs.html.en b/docs/manual/mod/mod_dav_fs.html.en index 95a7e9f246..f6350bc4be 100644 --- a/docs/manual/mod/mod_dav_fs.html.en +++ b/docs/manual/mod/mod_dav_fs.html.en @@ -41,9 +41,7 @@ will be invoked by using theExemple
-<Location /MSWord> +Exemple
<Location /MSWord> DavMinTimeout 600 -</Location> -+</Location>Davdirective: -Example
- Dav filesystem -+Example
Dav filesystemSince
filesystemis the default provider for @@ -76,9 +74,7 @@ -Example
- DavLockDB var/DavLock -+Example
DavLockDB var/DavLockThe directory containing the lock database file must be diff --git a/docs/manual/mod/mod_dav_fs.html.fr b/docs/manual/mod/mod_dav_fs.html.fr index f9a160e718..44da75d63f 100644 --- a/docs/manual/mod/mod_dav_fs.html.fr +++ b/docs/manual/mod/mod_dav_fs.html.fr @@ -43,9 +43,7 @@ de
-mod_davsont invoqués via la directiveDav:Exemple
- Dav filesystem -+Exemple
Dav filesystemComme
filesystemest le fournisseur par défaut de @@ -79,9 +77,7 @@ -Exemple
- DavLockDB var/DavLock -+Exemple
DavLockDB var/DavLockLes utilisateur et groupe sous lesquels Apache s'exécute et qui diff --git a/docs/manual/mod/mod_dav_lock.html.en b/docs/manual/mod/mod_dav_lock.html.en index 1e6178e37a..1daf4113fd 100644 --- a/docs/manual/mod/mod_dav_lock.html.en +++ b/docs/manual/mod/mod_dav_lock.html.en @@ -79,9 +79,7 @@
-mod_dav_lockuses a SDBM database to track user locks.Example
- DavGenericLockDB var/DavLock -+Example
DavGenericLockDB var/DavLockThe directory containing the lock database file must be diff --git a/docs/manual/mod/mod_dav_lock.html.fr b/docs/manual/mod/mod_dav_lock.html.fr index 2a68c183aa..9959f8c0ea 100644 --- a/docs/manual/mod/mod_dav_lock.html.fr +++ b/docs/manual/mod/mod_dav_lock.html.fr @@ -85,9 +85,7 @@
-mod_dav_lockutilise une base de données SDBM pour surveiller les verrous utilisateurs.Exemple
- DavGenericLockDB var/DavLock -+Exemple
DavGenericLockDB var/DavLockLes utilisateur et groupe sous lesquels Apache s'exécute et qui diff --git a/docs/manual/mod/mod_dbd.html.en b/docs/manual/mod/mod_dbd.html.en index 1074ba2458..deba31e5b9 100644 --- a/docs/manual/mod/mod_dbd.html.en +++ b/docs/manual/mod/mod_dbd.html.en @@ -83,8 +83,7 @@
-
mod_dbdexports five functions for other modules to use. The API is as follows:-typedef struct { +typedef struct { apr_dbd_t *handle; apr_dbd_driver_t *driver; apr_hash_t *prepared; @@ -119,8 +118,7 @@ APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*)); APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*)); APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*)); APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*)); -APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*)); -+APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));diff --git a/docs/manual/mod/mod_dbd.html.fr b/docs/manual/mod/mod_dbd.html.fr index 6520084a19..fbf134df8c 100644 --- a/docs/manual/mod/mod_dbd.html.fr +++ b/docs/manual/mod/mod_dbd.html.fr @@ -85,8 +85,7 @@ passe-
mod_dbdexporte cinq fonctions que d'autres modules pourront utiliser. L'API se présente comme suit :-typedef struct { +typedef struct { apr_dbd_t *handle; apr_dbd_driver_t *driver; apr_hash_t *prepared; @@ -124,8 +123,7 @@ APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*)); APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*)); APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*)); APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*)); -APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*)); -+APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));diff --git a/docs/manual/mod/mod_deflate.html.en b/docs/manual/mod/mod_deflate.html.en index 4f7160715b..6410b8d8f0 100644 --- a/docs/manual/mod/mod_deflate.html.en +++ b/docs/manual/mod/mod_deflate.html.en @@ -68,9 +68,7 @@ clientThis is a simple configuration that compresses common text-based content types.
-@@ -88,10 +86,8 @@ client will enable compression for documents in the container where it is placed: -Compress only a few types
- AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript -+Compress only a few types
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript-SetOutputFilter DEFLATE -SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip -+SetOutputFilter DEFLATE +SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzipIf you want to restrict the compression to particular MIME types @@ -99,11 +95,9 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip enabling compression only for the html files of the Apache documentation:
--<Directory "/your-server-root/manual"> +<Directory "/your-server-root/manual"> AddOutputFilterByType DEFLATE text/html -</Directory> -+</Directory>Note
@@ -124,12 +118,10 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip this feature you have to insert theINFLATEfilter into the outputfilter chain usingSetOutputFilterorAddOutputFilter, for example: --<Location /dav-area> +<Location /dav-area> ProxyPass http://example.com/ SetOutputFilter INFLATE -</Location> -+</Location>This Example will uncompress gzip'ed output from example.com, so other @@ -143,11 +135,9 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip this feature you have to insert the
-DEFLATEfilter into the input filter chain usingSetInputFilterorAddInputFilter, for example:-<Location /dav-area> +<Location /dav-area> SetInputFilter DEFLATE -</Location> -+</Location>Now if a request contains a
-Content-Encoding: @@ -182,9 +172,7 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip in a typical configuration where the addition of theDEFLATEfilter depends on theUser-Agent, you should add:- Header append Vary User-Agent -+Header append Vary User-AgentIf your decision about compression depends on other information @@ -192,9 +180,7 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
-Varyheader to the value*. This prevents compliant proxies from caching entirely.@@ -244,12 +230,10 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip the directive. You can use that note for statistical purposes by adding the value to your access log. -Example
- Header set Vary * -+Example
Header set Vary *Example
- DeflateFilterNote ratio +Example
DeflateFilterNote ratio LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate - CustomLog logs/deflate_log deflate -+ CustomLog logs/deflate_log deflateIf you want to extract more accurate values from your logs, you @@ -271,14 +255,12 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
Thus you may log it this way:
-Accurate Logging
-DeflateFilterNote Input instream +Accurate Logging
DeflateFilterNote Input instream DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate -CustomLog logs/deflate_log deflate -+CustomLog logs/deflate_log deflateSee also
diff --git a/docs/manual/mod/mod_deflate.html.fr b/docs/manual/mod/mod_deflate.html.fr index df64441e4e..45714e3758 100644 --- a/docs/manual/mod/mod_deflate.html.fr +++ b/docs/manual/mod/mod_deflate.html.fr @@ -69,9 +69,7 @@ clientVoici un exemple simple de configuration qui permet de comprimer les types de contenu à base de texte.
-@@ -89,10 +87,8 @@ client directive suivante active la compression des documents dans le conteneur où elle est placée : -Ne comprime que certains types de documents
- AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript -+Ne comprime que certains types de documents
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript-SetOutputFilter DEFLATE -SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip -+SetOutputFilter DEFLATE +SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzipSi vous voulez limiter la compression à certains types MIME @@ -100,11 +96,9 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip où la compression n'est activée que pour les fichiers html de la documentation d'Apache :
--<Directory "/your-server-root/manual"> +<Directory "/your-server-root/manual"> AddOutputFilterByType DEFLATE text/html -</Directory> -+</Directory>Note
@@ -129,12 +123,10 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzipAddOutputFilter, comme dans l'exemple suivant : --<Location /dav-area> +<Location /dav-area> ProxyPass http://example.com/ SetOutputFilter INFLATE -</Location> -+</Location>Dans cet exemple, les sorties comprimées par gzip en @@ -152,11 +144,9 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
-AddInputFilter, comme dans l'exemple suivant :-<Location /dav-area> +<Location /dav-area> SetInputFilter DEFLATE -</Location> -+</Location>Désormais, si une requête contient un en-tête @@ -196,9 +186,7 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
-DEFLATEdépend du contenu de l'en-têteUser-Agent, vous devez spécifier :- Header append Vary User-Agent -+Header append Vary User-AgentSi votre décision de comprimer le contenu dépend d'autres @@ -207,9 +195,7 @@ SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
-Varyla valeur*, ce qui permet d'empêcher les mandataires compatibles de tout mettre en cache.@@ -264,12 +250,10 @@ sortie d'un argument de la directive. Vous pouvez utiliser cette note à des fins statistiques en enregistrant sa valeur dans votre journal des accès. -Exemple
- Header set Vary * -+Exemple
Header set Vary *Exemple
- DeflateFilterNote ratio +Exemple
DeflateFilterNote ratio LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate - CustomLog logs/deflate_log deflate -+ CustomLog logs/deflate_log deflatePour extraire des informations plus précises de vos journaux, @@ -295,14 +279,12 @@ sortie
Vous pouvez donc configurer votre journalisation de la manière suivante :
-Journalisation détaillée
-DeflateFilterNote Input instream +Journalisation détaillée
DeflateFilterNote Input instream DeflateFilterNote Output outstream DeflateFilterNote Ratio ratio LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate -CustomLog logs/deflate_log deflate -+CustomLog logs/deflate_log deflateVoir aussi
diff --git a/docs/manual/mod/mod_dialup.html.en b/docs/manual/mod/mod_dialup.html.en index cf2e0216e2..c0d29c8eb9 100644 --- a/docs/manual/mod/mod_dialup.html.en +++ b/docs/manual/mod/mod_dialup.html.en @@ -37,11 +37,9 @@ by the various old modem standards. So, you can browse your site with a 56k V.92 modem, by adding something like this: --<Location /mysite> +<Location /mysite> ModemStandard V.92 -</Location> -+</Location>Previously to do bandwidth rate limiting modules would have to block an entire @@ -67,11 +65,9 @@ once the timer hits. From there the handler can continue to send data to the cl
Specify what modem standard you wish to simulate.
--<Location /mysite> +diff --git a/docs/manual/mod/mod_dialup.html.fr b/docs/manual/mod/mod_dialup.html.fr index b691f8a6cb..5dbcd9c17c 100644 --- a/docs/manual/mod/mod_dialup.html.fr +++ b/docs/manual/mod/mod_dialup.html.fr @@ -39,11 +39,9 @@ passante limit modems. Ainsi, il est possible de naviguer sur votre site avec un modem 56k V.92 en positionnant une configuration de ce type : -<Location /mysite> ModemStandard V.26bis -</Location> -+</Location>-<Location /mysite> +<Location /mysite> ModemStandard V.92 -</Location> -+</Location>Auparavant, pour faire des modules de limitation de bande passante, @@ -73,11 +71,9 @@ client.
Cette directive permet de spécifier le standard de modem que vous souhaitez simuler.
--<Location /mysite> +diff --git a/docs/manual/mod/mod_dir.html.en b/docs/manual/mod/mod_dir.html.en index 4469550e7d..36f9b8f0db 100644 --- a/docs/manual/mod/mod_dir.html.en +++ b/docs/manual/mod/mod_dir.html.en @@ -120,9 +120,7 @@ a directory set, the server will generate its own listing of the directory. -<Location /mysite> ModemStandard V.26bis -</Location> -+</Location>diff --git a/docs/manual/mod/mod_mime.html.en b/docs/manual/mod/mod_mime.html.en index 2b031bffbb..2f0ad51dc2 100644 --- a/docs/manual/mod/mod_mime.html.en +++ b/docs/manual/mod/mod_mime.html.en @@ -156,11 +156,9 @@ script, but not the fileExample
- DirectoryIndex index.html -+Example
DirectoryIndex index.htmlthen a request for
http://example.com/docs/would @@ -132,9 +130,7 @@ a directoryNote that the documents do not need to be relative to the directory;
-- DirectoryIndex index.html index.txt /cgi-bin/index.pl -+DirectoryIndex index.html index.txt /cgi-bin/index.plwould cause the CGI script
-/cgi-bin/index.plto be @@ -150,8 +146,7 @@ a directory directives within the same context will add to the list of resources to look for rather than replace:-# Example A: Set index.html as an index page, then add index.php to that list as well. +@@ -204,9 +198,7 @@ a directory -# Example A: Set index.html as an index page, then add index.php to that list as well. <Directory /foo> DirectoryIndex index.html DirectoryIndex index.php @@ -168,8 +163,7 @@ a directory DirectoryIndex index.html DirectoryIndex disabled DirectoryIndex index.php -</Directory> -+</Directory>Example
- DirectoryIndexRedirect on -+Example
DirectoryIndexRedirect onA request for
-http://example.com/docs/would @@ -248,13 +240,11 @@ a directory be aware that there are possible security implications to doing this.-# see security warning below! +# see security warning below! <Location /some/path> DirectorySlash Off SetHandler some-handler -</Location> -+</Location>diff --git a/docs/manual/mod/mod_dir.html.fr b/docs/manual/mod/mod_dir.html.fr index ca75d94066..2e1a6f2cad 100644 --- a/docs/manual/mod/mod_dir.html.fr +++ b/docs/manual/mod/mod_dir.html.fr @@ -127,9 +127,7 @@ client envoie une requSecurity Warning
@@ -284,9 +274,7 @@ a directoryUse this to set a handler for any URL that doesn't map to anything in your filesystem, and would otherwise return HTTP 404 (Not Found). For example
-- FallbackResource /not-404.php -+FallbackResource /not-404.phpwill cause requests for non-existent files to be handled by
-not-404.php, while requests for files that exist @@ -299,9 +287,7 @@ a directorymod_rewrite, and the use of the-fand-dtests for file and directory existence. This now requires only one line of configuration.- FallbackResource /index.php -+FallbackResource /index.phpExisting files, such as images, css files, and so on, will be served normally.
@@ -309,14 +295,12 @@ a directory if inheritance from a parent directory is not desired.In a sub-URI, such as http://example.com/blog/ this sub-URI has to be supplied as local-url:
--<Directory /web/example.com/htdocs/blog> +<Directory /web/example.com/htdocs/blog> FallbackResource /blog/index.php </Directory> <Directory /web/example.com/htdocs/blog/images> FallbackResource disabled -</Directory> -+</Directory>Indexesest définie, le serveur générera son propre listing du répertoire. -@@ -499,9 +493,7 @@ CustomLog referer.log referer env=!localreferer to define another nickname. Note that the nickname should not contain percent signs (Exemple
- DirectoryIndex index.html -+Exemple
DirectoryIndex index.htmlAvec cette configuration, une requête pour l'URL @@ -141,9 +139,7 @@ client envoie une requ
Notez qu'il n'est pas nécessaire que les documents soient relatifs au répertoire ;
-- DirectoryIndex index.html index.txt /cgi-bin/index.pl -+DirectoryIndex index.html index.txt /cgi-bin/index.plprovoquerait l'exécution du script CGI @@ -162,8 +158,7 @@ client envoie une requ contexte permet d'ajouter des ressources à rechercher plutôt que de remplacer celle déjà définies :
--# Exemple A: définit index.html comme page d'index, ainsi qu'index.php. +@@ -221,9 +215,7 @@ r -# Exemple A: définit index.html comme page d'index, ainsi qu'index.php. <Directory /foo> DirectoryIndex index.html DirectoryIndex index.php @@ -181,8 +176,7 @@ client envoie une requ DirectoryIndex index.html DirectoryIndex disabled DirectoryIndex index.php -</Directory> -+</Directory>@@ -80,9 +78,7 @@Exemple
- DirectoryIndexRedirect on -+Exemple
DirectoryIndexRedirect onUne requête pour
-http://example.com/docs/se @@ -273,13 +265,11 @@ fin" Gardez cependant à l'esprit que ceci peut avoir des répercutions en matière de sécurité.-# voir l'avertissement de sécurité ci-dessous ! +# voir l'avertissement de sécurité ci-dessous ! <Location /some/path> DirectorySlash Off SetHandler some-handler -</Location> -+</Location>diff --git a/docs/manual/mod/mod_dumpio.html.en b/docs/manual/mod/mod_dumpio.html.en index 547a12b58a..403ff6f983 100644 --- a/docs/manual/mod/mod_dumpio.html.en +++ b/docs/manual/mod/mod_dumpio.html.en @@ -63,9 +63,7 @@ the below directives. Additionally,Avertissement de sécurité
@@ -316,9 +306,7 @@ aucun fichier et qui provoquerait sans cela l'envoi d'un code d'erreur HTTP 404 (Not Found). Par exemple -- FallbackResource /not-404.php -+FallbackResource /not-404.phpfait en sorte que les requêtes ne correspondant à aucun fichier soient traitées par
-non-404.php, sans affecter les @@ -333,9 +321,7 @@ aucun fichier conditionnels-fet-dpour vérifier l'existence des fichiers et répertoires. Maintenant, une seule ligne de configuration est nécessaire.- FallbackResource /index.php -+FallbackResource /index.phpLes fichiers existants comme des images, des fichiers css, etc... seront traités normalement.
@@ -345,14 +331,12 @@ aucun fichierPour un URI intermédiaire tel que http://example.com/blog/, cet URI intermédiaire doit être spécifié en tant que url-locale :
--<Directory /web/example.com/htdocs/blog> +<Directory /web/example.com/htdocs/blog> FallbackResource /blog/index.php </Directory> <Directory /web/example.com/htdocs/blog/images> FallbackResource disabled -</Directory> -+</Directory>mod_dumpioneeds to be configured toLogLeveltrace7: -- LogLevel dumpio:trace7 -+LogLevel dumpio:trace7Enable dumping of all input.
-@@ -98,9 +94,7 @@Example
- DumpIOInput On -+Example
DumpIOInput OnEnable dumping of all output.
-diff --git a/docs/manual/mod/mod_echo.html.en b/docs/manual/mod/mod_echo.html.en index e801cf250d..77bdbb6196 100644 --- a/docs/manual/mod/mod_echo.html.en +++ b/docs/manual/mod/mod_echo.html.en @@ -59,9 +59,7 @@ modulesExample
- DumpIOOutput On -+Example
DumpIOOutput OnThe
-ProtocolEchodirective enables or disables the echo server.diff --git a/docs/manual/mod/mod_echo.html.fr b/docs/manual/mod/mod_echo.html.fr index 2efaeebef9..31f6aa37c8 100644 --- a/docs/manual/mod/mod_echo.html.fr +++ b/docs/manual/mod/mod_echo.html.fr @@ -59,9 +59,7 @@ protocoleExample
- ProtocolEcho On -+Example
ProtocolEcho OnLa directive
-ProtocolEchopermet d'activer ou de désactiver le serveur d'écho.diff --git a/docs/manual/mod/mod_env.html.en b/docs/manual/mod/mod_env.html.en index 24aca852ec..77199b21eb 100644 --- a/docs/manual/mod/mod_env.html.en +++ b/docs/manual/mod/mod_env.html.en @@ -73,9 +73,7 @@ SSI pages native OS environment of the shell which invoked theExemple
- ProtocolEcho On -+Exemple
ProtocolEcho Onhttpdprocess. -@@ -92,9 +90,7 @@ SSI pagesExample
- PassEnv LD_LIBRARY_PATH -+Example
PassEnv LD_LIBRARY_PATHSets an internal environment variable, which is then available to Apache HTTP Server modules, and passed on to CGI scripts and SSI pages.
-Example
- SetEnv SPECIAL_PATH /foo/bin -+Example
SetEnv SPECIAL_PATH /foo/binIf you omit the value argument, the variable is set to @@ -129,9 +125,7 @@ SSI pages
Removes one or more internal environment variables from those passed on to CGI scripts and SSI pages.
-diff --git a/docs/manual/mod/mod_env.html.fr b/docs/manual/mod/mod_env.html.fr index 3b171a7a18..e6ce3b852b 100644 --- a/docs/manual/mod/mod_env.html.fr +++ b/docs/manual/mod/mod_env.html.fr @@ -77,9 +77,7 @@ shell valeurs sont issues de l'environnement natif de l'OS associé au shell qui a invoqué le processusExample
- UnsetEnv LD_LIBRARY_PATH -+Example
UnsetEnv LD_LIBRARY_PATHhttpd. -@@ -97,9 +95,7 @@ shell ensuite disponible pour les modules du serveur HTTP Apache et transmise aux scripts CGI et aux pages SSI. -Exemple
- PassEnv LD_LIBRARY_PATH -+Exemple
PassEnv LD_LIBRARY_PATHdiff --git a/docs/manual/mod/mod_info.html.en b/docs/manual/mod/mod_info.html.en index 48054e0a23..c2f4030fe7 100644 --- a/docs/manual/mod/mod_info.html.en +++ b/docs/manual/mod/mod_info.html.en @@ -39,11 +39,9 @@ configurationExemple
- SetEnv SPECIAL_PATH /foo/bin -+Exemple
SetEnv SPECIAL_PATH /foo/binSi l'argument valeur est absent, la variable est @@ -136,9 +132,7 @@ shell
Supprime une ou plusieurs variables d'environnement internes parmi celles qui sont transmises aux scripts CGI et aux pages SSI.
-diff --git a/docs/manual/mod/mod_example.html.en b/docs/manual/mod/mod_example.html.en index 06136b58b0..9e61283090 100644 --- a/docs/manual/mod/mod_example.html.en +++ b/docs/manual/mod/mod_example.html.en @@ -114,18 +114,14 @@Exemple
- UnsetEnv LD_LIBRARY_PATH -+Exemple
UnsetEnv LD_LIBRARY_PATHTo activate the example module, include a block similar to the following in your
-httpd.conffile:-<Location /example-info> +<Location /example-info> SetHandler example-handler -</Location> -+</Location>As an alternative, you can put the following into a
-.htaccessfile and then request the file "test.example" from that location:- AddHandler example-handler .example -+AddHandler example-handler .exampleAfter reloading/restarting your server, you should be able diff --git a/docs/manual/mod/mod_example.html.fr b/docs/manual/mod/mod_example.html.fr index 2eb89db52f..fb6aaa7ebf 100644 --- a/docs/manual/mod/mod_example.html.fr +++ b/docs/manual/mod/mod_example.html.fr @@ -123,20 +123,16 @@
Pour activer le module example, ajoutez à votre fichier
-httpd.confun bloc du style :-<Location /example-info> +<Location /example-info> SetHandler example-handler -</Location> -+</Location>Vous pouvez aussi ajouter ce qui suit dans un fichier
-.htaccess, puis accéder au fichier "test.example" à partir du répertoire correspondant :- AddHandler example-handler .example -+AddHandler example-handler .examplediff --git a/docs/manual/mod/mod_expires.html.en b/docs/manual/mod/mod_expires.html.en index de2dc18122..b8a87f04c6 100644 --- a/docs/manual/mod/mod_expires.html.en +++ b/docs/manual/mod/mod_expires.html.en @@ -77,10 +77,8 @@ criteriaExpiresByTypedirectives can also be defined in a more readable syntax of the form: --ExpiresDefault "base [plus num type] [num type] ..." -ExpiresByType type/encoding "base [plus num type] [num type] ..." -+ExpiresDefault "base [plus num type] [num type] ..." +ExpiresByType type/encoding "base [plus num type] [num type] ..."where base is one of:
@@ -112,20 +110,16 @@ ExpiresByType type/encoding "base [plus num type --ExpiresDefault "access plus 1 month" +ExpiresDefault "access plus 1 month" ExpiresDefault "access plus 4 weeks" -ExpiresDefault "access plus 30 days" -+ExpiresDefault "access plus 30 days"The expiry time can be fine-tuned by adding several 'num type' clauses:
--ExpiresByType text/html "access plus 1 month 15 days 2 hours" -ExpiresByType image/gif "modification plus 5 hours 3 minutes" -+ExpiresByType text/html "access plus 1 month 15 days 2 hours" +ExpiresByType image/gif "modification plus 5 hours 3 minutes"Note that if you use a modification date based setting, the @@ -205,15 +199,13 @@ by MIME type the same images (i.e., the images will be accessed repeatedly within a relatively short timespan).
-@@ -974,10 +966,8 @@ server. output of a file each processing different commands (possibly at different times). -Example:
-# enable expirations +Example:
# enable expirations ExpiresActive On # expire GIF images after a month in the client's cache ExpiresByType image/gif A2592000 # HTML documents are good for a week from the # time they were changed -ExpiresByType text/html M604800 -+ExpiresByType text/html M604800Note that this directive only has effect if diff --git a/docs/manual/mod/mod_expires.html.fr b/docs/manual/mod/mod_expires.html.fr index 0caedd76f2..3518193d36 100644 --- a/docs/manual/mod/mod_expires.html.fr +++ b/docs/manual/mod/mod_expires.html.fr @@ -80,10 +80,8 @@ l'intervalle
Pour une syntaxe plus lisible, on peut aussi utiliser les directives
-ExpiresDefaultetExpiresByTypecomme suit :-ExpiresDefault "base [plus num type] [num type] ..." -ExpiresByType type/encoding "base [plus num type] [num type] ..." -+ExpiresDefault "base [plus num type] [num type] ..." +ExpiresByType type/encoding "base [plus num type] [num type] ..."où base peut être :
@@ -113,21 +111,17 @@ ExpiresByType type/encoding "base [plus num typePar exemple, pour faire expirer par défaut les documents 1 mois après leur accès, on peut utiliser une des directives suivantes : --ExpiresDefault "access plus 1 month" +ExpiresDefault "access plus 1 month" ExpiresDefault "access plus 4 weeks" -ExpiresDefault "access plus 30 days" -+ExpiresDefault "access plus 30 days"La date d'expiration peut être définie plus précisément en ajoutant plusieurs clauses 'num type' :
--ExpiresByType text/html "access plus 1 month 15 days 2 hours" -ExpiresByType image/gif "modification plus 5 hours 3 minutes" -+ExpiresByType text/html "access plus 1 month 15 days 2 hours" +ExpiresByType image/gif "modification plus 5 hours 3 minutes"Notez que si vous utilisez une configuration basée sur la date de @@ -210,16 +204,14 @@ en fonction du type MIME images sont alors accédées de manière répétitive dans un intervalle de temps assez court).
-diff --git a/docs/manual/mod/mod_heartmonitor.html.en b/docs/manual/mod/mod_heartmonitor.html.en index f20cdaa919..81a7faf403 100644 --- a/docs/manual/mod/mod_heartmonitor.html.en +++ b/docs/manual/mod/mod_heartmonitor.html.en @@ -77,9 +77,7 @@ useExemple :
-# active la génération des en-têtes Expires +Exemple :
# active la génération des en-têtes Expires ExpiresActive On # les images GIF expirent au bout d'un mois dans le cache du # client ExpiresByType image/gif A2592000 # les documents HTML restent valables une semaine après leur date # de dernière modification -ExpiresByType text/html M604800 -+ExpiresByType text/html M604800Notez que cette directive ne produit d'effet que si diff --git a/docs/manual/mod/mod_ext_filter.html.en b/docs/manual/mod/mod_ext_filter.html.en index 061c437e07..e7a196da3b 100644 --- a/docs/manual/mod/mod_ext_filter.html.en +++ b/docs/manual/mod/mod_ext_filter.html.en @@ -78,8 +78,7 @@ delivery to the client
Examples
Generating HTML from some other type of response
--# mod_ext_filter directive to define a filter +@@ -105,8 +103,7 @@ ExtFilterDefine c-to-html mode=output \ Please refer to# mod_ext_filter directive to define a filter # to HTML-ize text/c files using the external # program /usr/bin/enscript, with the type of # the result set to text/html @@ -95,8 +94,7 @@ ExtFilterDefine c-to-html mode=output \ # mod_mime directive to set the type of .c # files to text/c AddType text/c .c -</Directory> -+</Directory>mod_deflatefor a practical implementation. --# mod_ext_filter directive to define the external filter +# mod_ext_filter directive to define the external filter ExtFilterDefine gzip mode=output cmd=/bin/gzip <Location /gzipped> @@ -118,14 +115,12 @@ ExtFilterDefine gzip mode=output cmd=/bin/gzip # mod_headers directive to add # "Content-Encoding: gzip" header field Header set Content-Encoding gzip -</Location> -+</Location>Slowing down the server
--# mod_ext_filter directive to define a filter +# mod_ext_filter directive to define a filter # which runs everything through cat; cat doesn't # modify anything; it just introduces extra pathlength # and consumes more resources @@ -137,14 +132,12 @@ ExtFilterDefine slowdown mode=output cmd=/bin/cat \ # be run several times on output # SetOutputFilter slowdown;slowdown;slowdown -</Location> -+</Location>Using sed to replace text in the response
--# mod_ext_filter directive to define a filter which +# mod_ext_filter directive to define a filter which # replaces text in the response # ExtFilterDefine fixtext mode=output intype=text/html \ @@ -154,14 +147,12 @@ ExtFilterDefine fixtext mode=output intype=text/html \ # core directive to cause the fixtext filter to # be run on output SetOutputFilter fixtext -</Location> -+</Location>Tracing another filter
--# Trace the data read and written by mod_deflate +-# Trace the data read and written by mod_deflate # for a particular client (IP 192.168.1.31) # experiencing compression problems. # This filter will trace what goes into mod_deflate. @@ -183,12 +174,10 @@ ExtFilterDefine traceafter \ <Directory /usr/local/docs> SetEnvIf Remote_Addr 192.168.1.31 trace_this_client SetOutputFilter tracebefore;deflate;traceafter -</Directory> -+</Directory>@@ -327,9 +315,7 @@ close(SAVE); filter is removed and the request continues without it. -Here is the filter which traces the data:
-#!/usr/local/bin/perl -w +Here is the filter which traces the data:
#!/usr/local/bin/perl -w use strict; open(SAVE, ">$ARGV[0]") @@ -199,8 +188,7 @@ while (<STDIN>) { print $_; } -close(SAVE); -+close(SAVE);- ExtFilterOptions LogStderr -+ExtFilterOptions LogStderrMessages written to the filter's standard error will be stored diff --git a/docs/manual/mod/mod_ext_filter.html.fr b/docs/manual/mod/mod_ext_filter.html.fr index 8f86788187..4d782b71cc 100644 --- a/docs/manual/mod/mod_ext_filter.html.fr +++ b/docs/manual/mod/mod_ext_filter.html.fr @@ -81,8 +81,7 @@ externe avant de l'envoyer au client
Générer du HTML à partir d'un autre type de contenu
--# la directive de mod_ext_filter définissant un filtre +@@ -110,8 +108,7 @@ ExtFilterDefine c-to-html mode=output \# la directive de mod_ext_filter définissant un filtre # permettant de mettre des fichiers text/c au format HTML en # utilisant le programme externe /usr/bin/enscript, le type du # fichier résultant étant défini à text/html @@ -98,8 +97,7 @@ ExtFilterDefine c-to-html mode=output \ # directive de mod_mime définissant le type des fichiers dont # le nom possède l'extension .c à text/c AddType text/c .c -</Directory> -+</Directory>mod_deflatepour un exemple d'implémentation plus pratique. --# la directive de mod_ext_filter qui définit le filtre externe +# la directive de mod_ext_filter qui définit le filtre externe ExtFilterDefine gzip mode=output cmd=/bin/gzip <Location /gzipped> @@ -123,15 +120,13 @@ ExtFilterDefine gzip mode=output cmd=/bin/gzip # la directive de mod_headers permettant d'ajouter le champ # d'en-tête "Content-Encoding: gzip" Header set Content-Encoding gzip -</Location> -+</Location>Ralentissement du serveur
--# directive de mod_ext_filter définissant un filtre qui fait +# directive de mod_ext_filter définissant un filtre qui fait # passer tous les flux en sortie par la commande cat ; cat ne # modifie rien ; elle ne fait que compliquer le cheminement des # flux et consommer des ressources supplémentaires @@ -144,16 +139,14 @@ ExtFilterDefine slowdown mode=output cmd=/bin/cat \ # sortie avec le filtre slowdown # SetOutputFilter slowdown;slowdown;slowdown -</Location> -+</Location>Utilisation de sed pour remplacer du texte dans la réponse
--# directive de mod_ext_filter définissant un filtre qui +# directive de mod_ext_filter définissant un filtre qui # remplace du texte dans la réponse # ExtFilterDefine fixtext mode=output intype=text/html \ @@ -163,15 +156,13 @@ ExtFilterDefine fixtext mode=output intype=text/html \ # directive de base permettant de traiter la sortie avec le # filtre fixtext SetOutputFilter fixtext -</Location> -+</Location>Tracer un autre filtre
--# Trace les données lues et écrites par mod_deflate pour un +-# Trace les données lues et écrites par mod_deflate pour un # client particulier (IP 192.168.1.31) qui a des problèmes de # compression. # Ce premier filtre va tracer ce qui entre dans mod_deflate. @@ -193,12 +184,10 @@ ExtFilterDefine traceafter \ <Directory /usr/local/docs> SetEnvIf Remote_Addr 192.168.1.31 trace_this_client SetOutputFilter tracebefore;deflate;traceafter -</Directory> -+</Directory>@@ -347,9 +335,7 @@ close(SAVE); sans lui. -Voici le filtre qui trace les données :
-#!/usr/local/bin/perl -w +Voici le filtre qui trace les données :
#!/usr/local/bin/perl -w use strict; open(SAVE, ">$ARGV[0]") @@ -209,8 +198,7 @@ while (<STDIN>) { print $_; } -close(SAVE); -+close(SAVE);- ExtFilterOptions LogStderr -+ExtFilterOptions LogStderrLes messages envoyés vers la sortie d'erreurs standard du filtre diff --git a/docs/manual/mod/mod_file_cache.html.en b/docs/manual/mod/mod_file_cache.html.en index 06441bda05..af31b47abe 100644 --- a/docs/manual/mod/mod_file_cache.html.en +++ b/docs/manual/mod/mod_file_cache.html.en @@ -169,9 +169,7 @@ with filenames rewritten by
-mod_aliasormod_rewrite.@@ -200,9 +198,7 @@ with filenames rewritten byExample
- CacheFile /usr/local/apache/htdocs/index.html -+Example
CacheFile /usr/local/apache/htdocs/index.htmlmod_aliasormod_rewrite. -diff --git a/docs/manual/mod/mod_file_cache.html.fr b/docs/manual/mod/mod_file_cache.html.fr index ab335fb842..fa85edd7c3 100644 --- a/docs/manual/mod/mod_file_cache.html.fr +++ b/docs/manual/mod/mod_file_cache.html.fr @@ -197,9 +197,7 @@ d fichiers réécrits parExample
- MMapFile /usr/local/apache/htdocs/index.html -+Example
MMapFile /usr/local/apache/htdocs/index.htmlmod_aliasoumod_rewrite. -@@ -232,9 +230,7 @@ m fichiers réécrits parExemple
- CacheFile /usr/local/apache/htdocs/index.html -+Exemple
CacheFile /usr/local/apache/htdocs/index.htmlmod_aliasoumod_rewrite. -diff --git a/docs/manual/mod/mod_filter.html.en b/docs/manual/mod/mod_filter.html.en index 4eddf176c0..9a1b3d238c 100644 --- a/docs/manual/mod/mod_filter.html.en +++ b/docs/manual/mod/mod_filter.html.en @@ -173,40 +173,33 @@Exemple
- MMapFile /usr/local/apache/htdocs/index.html -+Exemple
MMapFile /usr/local/apache/htdocs/index.html@@ -287,9 +279,7 @@ being moved to
- Server side Includes (SSI)
- A simple case of replacing
AddOutputFilterByType--FilterDeclare SSI +FilterDeclare SSI FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|" -FilterChain SSI -+FilterChain SSI- Server side Includes (SSI)
- The same as the above but dispatching on handler (classic SSI behaviour; .shtml files get processed). -
-FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'" -FilterChain SSI -+FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'" +FilterChain SSI- Emulating mod_gzip with mod_deflate
- Insert INFLATE filter only if "gzip" is NOT in the Accept-Encoding header. This filter runs with ftype CONTENT_SET. -
-FilterDeclare gzip CONTENT_SET +FilterDeclare gzip CONTENT_SET FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/" -FilterChain gzip -+FilterChain gzip- Image Downsampling
- Suppose we want to downsample all web images, and have filters for GIF, JPEG and PNG. -
-FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'" +FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'" FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'" FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'" @@ -218,8 +211,7 @@ FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'" FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'" <Location /image-filter> FilterChain unpack downsample repack -</Location> -+</Location>mod_filter<text/htmlortext/plainbefore it is sent to the client. -- AddOutputFilterByType DEFLATE text/html text/plain -+AddOutputFilterByType DEFLATE text/html text/plainIf you want the content to be processed by more than one filter, their @@ -302,12 +292,10 @@ being moved to
-mod_filter<INCLUDESfilter and then by theDEFLATEfilter.-<Location /cgi-bin/> +diff --git a/docs/manual/mod/mod_firehose.html.en b/docs/manual/mod/mod_firehose.html.en index 296cdb43cf..d0ffb15f2d 100644 --- a/docs/manual/mod/mod_firehose.html.en +++ b/docs/manual/mod/mod_firehose.html.en @@ -123,8 +123,7 @@<Location /cgi-bin/> Options Includes AddOutputFilterByType INCLUDES;DEFLATE text/html -</Location> -+</Location>The BNF for the fragment format is as follows:
-- stream = 0*(fragment) +stream = 0*(fragment) fragment = header CRLF body CRLF @@ -140,8 +139,7 @@ body = <the binary content of the fragment> SPC = <a single space> - CRLF = <a carriage return, followed by a line feed> -+ CRLF = <a carriage return, followed by a line feed>All fragments for a connection or a request will share the same UUID, depending on whether connections or requests are being recorded. @@ -177,9 +175,7 @@ later. requests will be captured within the same connection if keepalive is present.
-@@ -199,9 +195,7 @@ later. Multiple requests will be captured within the same connection if keepalive is present. -Example
- FirehoseConnectionInput connection-input.firehose -+Example
FirehoseConnectionInput connection-input.firehose@@ -219,9 +213,7 @@ later.Example
- FirehoseConnectionOutput connection-output.firehose -+Example
FirehoseConnectionOutput connection-output.firehoseCapture traffic being received by mod_proxy.
-@@ -239,9 +231,7 @@ later.Example
- FirehoseProxyConnectionInput proxy-input.firehose -+Example
FirehoseProxyConnectionInput proxy-input.firehoseCapture traffic being sent out by mod_proxy.
-@@ -260,9 +250,7 @@ later.Example
- FirehoseProxyConnectionOutput proxy-output.firehose -+Example
FirehoseProxyConnectionOutput proxy-output.firehoseCapture traffic coming into the server on each request. Requests will be captured separately, regardless of the presence of keepalive.
-@@ -281,9 +269,7 @@ later.Example
- FirehoseRequestInput request-input.firehose -+Example
FirehoseRequestInput request-input.firehoseCapture traffic going out of the server on each request. Requests will be captured separately, regardless of the presence of keepalive.
-diff --git a/docs/manual/mod/mod_headers.html.en b/docs/manual/mod/mod_headers.html.en index 1be10a4b5d..3731b5dccc 100644 --- a/docs/manual/mod/mod_headers.html.en +++ b/docs/manual/mod/mod_headers.html.en @@ -63,10 +63,8 @@ headers order in the configuration file and by placement in configuration sections. These two directives have a different effect if reversed: -Example
- FirehoseRequestOutput request-output.firehose -+Example
FirehoseRequestOutput request-output.firehose-RequestHeader append MirrorID "mirror 12" -RequestHeader unset MirrorID -+RequestHeader append MirrorID "mirror 12" +RequestHeader unset MirrorIDThis way round, the
MirrorIDheader is not set. If @@ -101,9 +99,7 @@ RequestHeader unset MirrorID Copy all request headers that begin with "TS" to the response headers: -- Header echo ^TS -+Header echo ^TS@@ -114,9 +110,7 @@ RequestHeader unset MirrorID the client to intuit load on the server or in isolating bottlenecks between the client and the server. -- Header set MyHeader "%D %t" -+Header set MyHeader "%D %t"results in this header being added to the response:
@@ -129,9 +123,7 @@ RequestHeader unset MirrorIDSay hello to Joe - @@ -183,11 +171,9 @@ Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader-Header set MyHeader "Hello Joe. It took %D microseconds for Apache to serve this request." -+Header set MyHeader "Hello Joe. It took %D microseconds for Apache to serve this request."results in this header being added to the response:
@@ -149,10 +141,8 @@ Header set MyHeader "Hello Joe. It took %D microseconds for Apache to serve this stimulus. Note that this example requires the services of themod_setenvifmodule. --SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader -Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader -+SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader +Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeaderIf the header
MyRequestHeader: myvalueis present on @@ -169,9 +159,7 @@ Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader description) by replacing https: with http: in the Destination header: -- RequestHeader edit Destination ^https: http: early -+RequestHeader edit Destination ^https: http: earlyNO_STOREenvironment variables all existed for the request): --Header merge Cache-Control no-cache env=CGI +Header merge Cache-Control no-cache env=CGI Header merge Cache-Control no-cache env=NO_CACHE -Header merge Cache-Control no-store env=NO_STORE -+Header merge Cache-Control no-store env=NO_STOREthen the response would contain the following header:
@@ -205,9 +191,7 @@ Header merge Cache-Control no-store env=NO_STORESet a test cookie if and only if the client didn't send us a cookie - diff --git a/docs/manual/mod/mod_headers.html.fr b/docs/manual/mod/mod_headers.html.fr index 9923f4bf21..65fe6b692b 100644 --- a/docs/manual/mod/mod_headers.html.fr +++ b/docs/manual/mod/mod_headers.html.fr @@ -66,10 +66,8 @@ tardif ces deux directives ont un effet différent si leur ordre est inversé : -- Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" -+Header set Set-Cookie testcookie "expr=-z %{req:Cookie}"-RequestHeader append MirrorID "mirror 12" -RequestHeader unset MirrorID -+RequestHeader append MirrorID "mirror 12" +RequestHeader unset MirrorIDDans cet ordre, l'en-tête
MirrorIDn'est pas défini. @@ -111,9 +109,7 @@ tardif Copie tous les en-têtes de requête qui commencent par "TS" vers les en-têtes de la réponse : -- Header echo ^TS -+Header echo ^TS@@ -126,9 +122,7 @@ tardif isoler les goulets d'étranglement entre le client et le serveur. -- Header set mon-en-tête "%D %t" -+Header set mon-en-tête "%D %t"le résultat est l'ajout à la réponse d'un en-tête du type :
@@ -148,10 +142,8 @@ tardifle résultat est l'ajout à la réponse d'un en-tête du type :
-- Header set MyHeader "Bonjour Joe. Il a fallu D=3775428 microsecondes à Apache - pour servir cette requête." -+Header set MyHeader "Bonjour Joe. Il a fallu D=3775428 microsecondes à Apache + pour servir cette requête."@@ -163,10 +155,8 @@ tardif exemple nécessite les services du modulemod_setenvif. --SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader -Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader -+SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader +Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeaderSi l'en-tête
mon-en-tête-requête: mavaleurest @@ -183,9 +173,7 @@ Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader du problème) en remplaçant https: par http: dans l'en-tête Destination : -- RequestHeader edit Destination ^https: http: early -+RequestHeader edit Destination ^https: http: early@@ -198,11 +186,9 @@ Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeaderNO_CACHEetNO_STOREexistent pour la requête) : --Header merge Cache-Control no-cache env=CGI +Header merge Cache-Control no-cache env=CGI Header merge Cache-Control no-cache env=NO_CACHE -Header merge Cache-Control no-store env=NO_STORE -+Header merge Cache-Control no-store env=NO_STOREalors, la réponse contiendra l'en-tête suivant :
@@ -222,9 +208,7 @@ Header merge Cache-Control no-store env=NO_STOREDéfinit un cookie de test si et seulement si le client n'envoie pas de cookie - diff --git a/docs/manual/mod/mod_heartbeat.html.en b/docs/manual/mod/mod_heartbeat.html.en index efebcbf64c..3f42601d73 100644 --- a/docs/manual/mod/mod_heartbeat.html.en +++ b/docs/manual/mod/mod_heartbeat.html.en @@ -95,9 +95,7 @@ multicast address to which- Header set Set-Cookie testcookie "expr=-z %{req:Cookie}" -+Header set Set-Cookie testcookie "expr=-z %{req:Cookie}"HeartbeatListenon a frontend proxy system. --HeartbeatAddress 239.0.0.1:27999 -+HeartbeatAddress 239.0.0.1:27999mod_slotmem_shm address will usually correspond to a configuredHeartbeatAddresson an origin server. -- HeartbeatListen 239.0.0.1:27999 -+HeartbeatListen 239.0.0.1:27999This module is inactive until this directive is used.
diff --git a/docs/manual/mod/mod_include.html.en b/docs/manual/mod/mod_include.html.en index b8ef0db7a8..bc8935ca83 100644 --- a/docs/manual/mod/mod_include.html.en +++ b/docs/manual/mod/mod_include.html.en @@ -80,10 +80,8 @@ parse them and assign the resulting document the mime type oftext/html: --AddType text/html .shtml -AddOutputFilter INCLUDES .shtml -+AddType text/html .shtml +AddOutputFilter INCLUDES .shtmlThe following directive must be given for the directories @@ -93,9 +91,7 @@ AddOutputFilter INCLUDES .shtml
-AllowOverrideOptionsis set):- Options +Includes -+Options +IncludesFor backwards compatibility, the
server-parsed@@ -819,9 +815,7 @@ AddOutputFilter INCLUDES .shtmlThis directive changes the string that
-mod_includelooks for to mark the end of an include element.- SSIEndTag "%>" -+SSIEndTag "%>"@@ -852,9 +846,7 @@ directive]"This directive has the same effect as the
-<!--#config errmsg=message -->element.- SSIErrorMsg "<!-- Error -->" -+SSIErrorMsg "<!-- Error -->"- SSIStartTag "<%"+
- SSIEndTag "%>" -SSIStartTag "<%"
+ SSIEndTag "%>"The example given above, which also specifies a matching @@ -1014,9 +1004,7 @@ displayed
This directive has the same effect as the
-<!--#config timefmt=formatstring -->element.- SSITimeFormat "%R, %B %d, %Y" -+SSITimeFormat "%R, %B %d, %Y"The above directive would cause times to be displayed in the @@ -1037,9 +1025,7 @@ displayed
This directive changes the string that
-mod_includedisplays when a variable is not set and "echoed".- SSIUndefinedEcho "<!-- undef -->" -+SSIUndefinedEcho "<!-- undef -->"To configure
-mod_info, add the following to yourhttpd.conffile.-<Location /server-info> +<Location /server-info> SetHandler server-info -</Location> -+</Location>You may wish to use
-mod_authz_hostinside the @@ -51,12 +49,10 @@ configuration directive to limit access to your server configuration information:-<Location /server-info> +<Location /server-info> SetHandler server-info Require host example.com -</Location> -+</Location>Once configured, the server information is obtained by @@ -91,16 +87,14 @@ configuration
You will probably want to use
-mod_authz_hostto limit access to your server configuration information.Access control
-<Location /server-info> +Access control
<Location /server-info> SetHandler server-info Order allow,deny # Allow access from server itself Allow from 127.0.0.1 # Additionally, allow access from local workstation Allow from 192.168.1.17 -</Location> -+</Location>@@ -188,11 +182,9 @@ information displayed by the server-info handler HTML interpreted, Additional Information for the module module-name. Example: -diff --git a/docs/manual/mod/mod_info.html.fr b/docs/manual/mod/mod_info.html.fr index 9ba8eb6c65..244ab7b399 100644 --- a/docs/manual/mod/mod_info.html.fr +++ b/docs/manual/mod/mod_info.html.fr @@ -39,23 +39,19 @@ serveur-AddModuleInfo mod_deflate.c 'See <a \ +AddModuleInfo mod_deflate.c 'See <a \ href="http://httpd.apache.org/docs/trunk/mod/mod_deflate.html">\ - http://httpd.apache.org/docs/trunk/mod/mod_deflate.html</a>' -+ http://httpd.apache.org/docs/trunk/mod/mod_deflate.html</a>'Pour activer
-mod_info, ajoutez les lignes suivantes à votre fichierhttpd.conf.-<Location /server-info> +<Location /server-info> SetHandler server-info -</Location> -+</Location>Il est recommandé d'utiliser
-mod_authz_hostà l'intérieur de la section<Location>afin de restreindre l'accès aux informations de configuration de votre serveur :-<Location /server-info> +<Location /server-info> SetHandler server-info Require host example.com -</Location> -+</Location>Une fois cette configuration effectuée, les informations du @@ -94,8 +90,7 @@ serveur restreindre l'accès aux informations de configuration de votre serveur.
-Contrôle d'accès
-<Location /server-info> +Contrôle d'accès
<Location /server-info> SetHandler server-info Order allow,deny # Autorisation d'accès depuis le serveur lui-même @@ -103,8 +98,7 @@ serveur # Autorisation d'accès depuis une station de travail du réseau # local Allow from 192.168.1.17 -</Location> -+</Location>@@ -196,11 +190,9 @@ module affich en tant qu'Information supplémentaire interprétée en HTML pour le module nom-module. Exemple : -diff --git a/docs/manual/mod/mod_isapi.html.en b/docs/manual/mod/mod_isapi.html.en index dabca3ea8f..f95d17b5a1 100644 --- a/docs/manual/mod/mod_isapi.html.en +++ b/docs/manual/mod/mod_isapi.html.en @@ -71,9 +71,7 @@ it to them with their file extensions. To enable any .dll file to be processed as an ISAPI extension, edit the httpd.conf file and add the following line: --AddModuleInfo mod_deflate.c 'See <a \ +AddModuleInfo mod_deflate.c 'See <a \ href="http://httpd.apache.org/docs/trunk/mod/mod_deflate.html">\ - http://httpd.apache.org/docs/trunk/mod/mod_deflate.html</a>' -+ http://httpd.apache.org/docs/trunk/mod/mod_deflate.html</a>'- AddHandler isapi-handler .dll -+AddHandler isapi-handler .dllIn older versions of the Apache server, @@ -87,9 +85,7 @@ requested module loaded. However, you may preload and keep a specific module loaded by using the following syntax in your httpd.conf: -- ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dll -+ISAPICacheFile c:/WebWork/Scripts/ISAPI/mytest.dllWhether or not you have preloaded an ISAPI extension, all diff --git a/docs/manual/mod/mod_ldap.html.en b/docs/manual/mod/mod_ldap.html.en index 4c945970f0..814eaada3f 100644 --- a/docs/manual/mod/mod_ldap.html.en +++ b/docs/manual/mod/mod_ldap.html.en @@ -91,8 +91,7 @@ by other LDAP modules
-mod_ldapto increase the performance of HTTP Basic authentication provided bymod_authnz_ldap.-# Enable the LDAP connection pool and shared +# Enable the LDAP connection pool and shared # memory cache. Enable the LDAP cache status # handler. Requires that mod_ldap and mod_authnz_ldap # be loaded. Change the "yourdomain.example.com" to @@ -115,8 +114,7 @@ LDAPOpCacheTTL 600 AuthBasicProvider ldap AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>@@ -211,11 +209,9 @@ LDAPOpCacheTTL 600 following directives could be used to access the@@ -314,8 +306,7 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der an error when an attempt is made to contact the LDAP server at runtime. -mod_ldapcache information: --<Location /server/cache-info> +<Location /server/cache-info> SetHandler ldap-status -</Location> -+</Location>By fetching the URL
-http://servername/cache-info, @@ -239,8 +235,7 @@ LDAPOpCacheTTL 600 as well as the type of encryption to be used on the connection (none, SSL or TLS/STARTTLS).-# Establish an SSL LDAP connection on port 636. Requires that +-# Establish an SSL LDAP connection on port 636. Requires that # mod_ldap and mod_authnz_ldap be loaded. Change the # "yourdomain.example.com" to match your domain. @@ -257,12 +252,10 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der AuthBasicProvider ldap AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>-# Establish a TLS LDAP connection on port 389. Requires that +# Establish a TLS LDAP connection on port 389. Requires that # mod_ldap and mod_authnz_ldap be loaded. Change the # "yourdomain.example.com" to match your domain. @@ -279,8 +272,7 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der AuthBasicProvider ldap AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS Require valid-user -</Location> -+</Location>-# Specify a Netscape CA certificate file +@@ -355,16 +345,14 @@ LDAPTrustedGlobalCert CA_SECMOD /certs/secmod LDAPTrustedMode parameter. If an ldaps:// URL is specified, SSL mode is forced, override this directive. -# Specify a Netscape CA certificate file LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db # Specify an optional key3.db file for client certificate support LDAPTrustedGlobalCert CERT_KEY3_DB /certs/key3.db @@ -333,8 +324,7 @@ LDAPTrustedGlobalCert CA_SECMOD /certs/secmod LDAPTrustedClientCert CERT_NICKNAME <nickname> [password] AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>-# Specify two CA certificate files +@@ -388,8 +376,7 @@ LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password] (ldaps://) support has been deprecated to be replaced with TLS, although the SSL functionality still works. -# Specify two CA certificate files LDAPTrustedGlobalCert CA_DER /certs/cacert1.der LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem # Specify a client certificate file and key LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password] # Do not use this directive, as it will throw an error -#LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem -+#LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem-# Specify two CA certificate files +diff --git a/docs/manual/mod/mod_ldap.html.fr b/docs/manual/mod/mod_ldap.html.fr index b2aadb1cd8..727f1ac05c 100644 --- a/docs/manual/mod/mod_ldap.html.fr +++ b/docs/manual/mod/mod_ldap.html.fr @@ -91,8 +91,7 @@ cache du r l'authentification HTTP de base fournie par# Specify two CA certificate files LDAPTrustedGlobalCert CA_DER /certs/cacert1.der LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem <Location /ldap-status> @@ -408,8 +395,7 @@ LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem AuthBasicProvider ldap AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>mod_authnz_ldap. --# Active la conservation des connexions LDAP et le cache partagé en +# Active la conservation des connexions LDAP et le cache partagé en # mémoire. Active le gestionnaire de statut du cache LDAP. # Nécessite le chargement de mod_ldap et de mod_authnz_ldap. # Remplacez "votre-domaine.example.com" par le nom de votre @@ -115,8 +114,7 @@ LDAPOpCacheTTL 600 AuthBasicProvider ldap AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>@@ -220,11 +218,9 @@ LDAPOpCacheTTL 600 suivantes pour accéder aux informations du cache de@@ -330,8 +322,7 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der de STARTTLS engendrera une erreur lors des tentatives de contacter le serveur LDAP pendant l'exécution. -mod_ldap: --<Location /server/cache-info> +<Location /server/cache-info> SetHandler ldap-status -</Location> -+</Location>En se connectant à l'URL @@ -250,8 +246,7 @@ LDAPOpCacheTTL 600 ainsi que le type de chiffrement à utiliser pour la connexion (none, SSL ou TLS/STARTTLS).
--# Etablissement d'une connexion SSL LDAP sur le port 636. +-# Etablissement d'une connexion SSL LDAP sur le port 636. # Nécessite le chargement de mod_ldap et mod_authnz_ldap. # Remplacez "votre-domaine.example.com" par le nom de votre # domaine. @@ -269,12 +264,10 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der AuthBasicProvider ldap AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>-# Etablissement d'une connexion TLS LDAP sur le port 389. +# Etablissement d'une connexion TLS LDAP sur le port 389. # Nécessite le chargement de mod_ldap et mod_authnz_ldap. # Remplacez "votre-domaine.example.com" par le nom de votre # domaine. @@ -292,8 +285,7 @@ LDAPTrustedGlobalCert CA_DER /certs/certfile.der AuthBasicProvider ldap AuthLDAPURL ldap://127.0.0.1/dc=example,dc=com?uid?one TLS Require valid-user -</Location> -+</Location>-# Spécifie un fichier de certificats de CA Netscape +@@ -375,8 +365,7 @@ LDAPTrustedGlobalCert CA_SECMOD /certs/secmod ldaps:// est spécifiée, le mode SSL est forcé, et l'emporte sur cette directive. -# Spécifie un fichier de certificats de CA Netscape LDAPTrustedGlobalCert CA_CERT7_DB /certs/cert7.db # Spécifie un fichier key3db optionnel pour le support des # certificats clients @@ -350,8 +341,7 @@ LDAPTrustedGlobalCert CA_SECMOD /certs/secmod LDAPTrustedClientCert CERT_NICKNAME <nickname> [password] AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>-# Spécifie deux fichiers contenant des certificats de CA +@@ -410,8 +398,7 @@ LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password] OpenLDAP indique que le support SSL (ldaps://) tend à être remplacé par TLS, bien que le mode SSL fonctionne toujours. -# Spécifie deux fichiers contenant des certificats de CA LDAPTrustedGlobalCert CA_DER /certs/cacert1.der LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem # Spécifie un fichier contenant des certificats clients @@ -385,8 +374,7 @@ LDAPTrustedGlobalCert CERT_BASE64 /certs/cert1.pem LDAPTrustedGlobalCert KEY_BASE64 /certs/key1.pem [password] # N'utilisez pas cette directive, sous peine de provoquer # une erreur -#LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem -+#LDAPTrustedClientCert CERT_BASE64 /certs/cert1.pem-# Spécifie deux fichiers contenant des certificats de CA +diff --git a/docs/manual/mod/mod_log_config.html.en b/docs/manual/mod/mod_log_config.html.en index d7d2251aa6..fb96dd47de 100644 --- a/docs/manual/mod/mod_log_config.html.en +++ b/docs/manual/mod/mod_log_config.html.en @@ -416,14 +416,12 @@ expr=expression]# Spécifie deux fichiers contenant des certificats de CA LDAPTrustedGlobalCert CA_DER /certs/cacert1.der LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem <Location /ldap-status> @@ -430,8 +417,7 @@ LDAPTrustedGlobalCert CA_BASE64 /certs/cacert2.pem AuthBasicProvider ldap AuthLDAPURL ldaps://127.0.0.1/dc=example,dc=com?uid?one Require valid-user -</Location> -+</Location>For example, the following two sets of directives have exactly the same effect:
--# CustomLog with format nickname +# CustomLog with format nickname LogFormat "%h %l %u %t \"%r\" %>s %b" common CustomLog logs/access_log common # CustomLog with explicit format string -CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" -+CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"The third argument is optional and controls whether or @@ -442,20 +440,16 @@ CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" images on your server in a separate logfile but not in your main log, you can use:
--SetEnvIf Request_URI \.gif$ gif-image +SetEnvIf Request_URI \.gif$ gif-image CustomLog gif-requests.log common env=gif-image -CustomLog nongif-requests.log common env=!gif-image -+CustomLog nongif-requests.log common env=!gif-imageOr, to reproduce the behavior of the old RefererIgnore directive, you might use the following:
--SetEnvIf Referer example\.com localreferer -CustomLog referer.log referer env=!localreferer -+SetEnvIf Referer example\.com localreferer +CustomLog referer.log referer env=!localreferer%). -@@ -342,8 +334,7 @@ function translate_name(r) end -- we don't care about this URL, give another module a chance return apache2.DECLINED -end - +end @@ -366,8 +357,7 @@ function translate_name(r) return apache2.DECLINED end return apache2.DECLINED -end - +endExample
- LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common -+@@ -524,10 +516,8 @@ CustomLog referer.log referer env=!localreferer which does not define a nickname. Common Log Format is used if no other format has been specified. -Example
LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_commondiff --git a/docs/manual/mod/mod_log_debug.html.en b/docs/manual/mod/mod_log_debug.html.en index 08653a1d2a..7d8e49803e 100644 --- a/docs/manual/mod/mod_log_debug.html.en +++ b/docs/manual/mod/mod_log_debug.html.en @@ -48,21 +48,17 @@Example
-LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" -TransferLog logs/access_log -+Example
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" +TransferLog logs/access_logLog message after request to /foo/* is processed: - -<Location /foo/> - LogMessage "/foo/ has been requested" -</Location> -+<Location /foo/> + LogMessage "/foo/ has been requested" +</Location>Log message if request to /foo/* is processed in a sub-request: - -<Location /foo/> - LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ} -</Location> -+<Location /foo/> + LogMessage "subrequest to /foo/" hook=type_checker expr=%{IS_SUBREQ} +</Location>The default log_transaction hook is not executed for sub-requests, @@ -72,9 +68,7 @@Log message if an IPv6 client causes a request timeout: - @@ -82,11 +76,9 @@- LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408" -+LogMessage "IPv6 timeout from %{REMOTE_ADDR}" "expr=-T %{IPV6} && %{REQUEST_STATUS} = 408"Note the placing of the double quotes for theexpr=argument.Log the value of the "X-Foo" request environment variable in each stage of the request: - -<Location /> - LogMessage "%{reqenv:X-Foo}" hook=all -</Location> -+<Location /> + LogMessage "%{reqenv:X-Foo}" hook=all +</Location>Together with microsecond time stamps in the error log,hook=allalso lets you determine the times spent diff --git a/docs/manual/mod/mod_lua.html.en b/docs/manual/mod/mod_lua.html.en index a4b0df1b92..f1d1bd6719 100644 --- a/docs/manual/mod/mod_lua.html.en +++ b/docs/manual/mod/mod_lua.html.en @@ -100,18 +100,14 @@ trust, as it can be abused to change the internal workings of httpd.The basic module loading directive is
-- LoadModule lua_module modules/mod_lua.so -+LoadModule lua_module modules/mod_lua.so-
mod_luaprovides a handler namedlua-script, which can be used with anAddHandlerdirective:-AddHandler lua-script .lua -+AddHandler lua-script .lua@@ -170,8 +166,7 @@ function handle(r) return 501 end return apache2.OK -end - +end
@@ -226,18 +221,15 @@ function authz_check_foo(r, ip, user) else return apache2.AUTHZ_DENIED end -end - +end
The following configuration registers this function as provider
-fooand configures it for URL/:-LuaAuthzProvider foo authz_provider.lua authz_check_foo +LuaAuthzProvider foo authz_provider.lua authz_check_foo <Location /> Require foo 10.1.2.3 john_doe -</Location> -+</Location>@@ -669,293 +659,216 @@ endThe request_rec object has (at least) the following methods:
--r:flush() -- flushes the output buffer. +-r:flush() -- flushes the output buffer. -- Returns true if the flush was successful, false otherwise. 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 -+end-r:addoutputfilter(name|function) -- add an output filter: +-r:addoutputfilter(name|function) -- add an output filter: -r:addoutputfilter("fooFilter") -- add the fooFilter to the output stream -+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:sendfile(filename) -- sends an entire file to the client, using sendfile if supported by the current platform: if use_sendfile_thing then r:sendfile("/var/www/large_file.img") -end -+end-r:parseargs() -- returns two tables; one standard key/value table for regular GET data, +-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:puts("Your name is: " .. GET['name'] or "Unknown")-r:parsebody([sizeLimit]) -- parse the request body as a POST and return two lua tables, +-r:parsebody([sizeLimit]) -- parse the request body as a POST and return two lua tables, -- just like r:parseargs(). -- An optional number may be passed to specify the maximum number -- of bytes to parse. Default is 8192 bytes: local POST, POSTMULTI = r:parsebody(1024*1024) -r:puts("Your name is: " .. POST['name'] or "Unknown") -+r:puts("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, self explanatory--r:write("a single string") -- print to response body, self explanatory -+r:write("a single string") -- print to response body, self explanatory--r:escape_html("<html>test</html>") -- Escapes HTML code and returns the escaped result -+r: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: +-r:base64_encode(string) -- Encodes a string using the Base64 encoding standard: -local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q= -+local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q=-r:base64_decode(string) -- Decodes a Base64-encoded string: +-r:base64_decode(string) -- Decodes a Base64-encoded string: -local decoded = r:base64_decode("VGhpcyBpcyBhIHRlc3Q=") -- returns 'This is a test' -+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): +-r:md5(string) -- Calculates and returns the MD5 digest of a string (binary safe): -local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339 -+local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339-r:sha1(string) -- Calculates and returns the SHA1 digest of a string (binary safe): +-r:sha1(string) -- Calculates and returns the SHA1 digest of a string (binary safe): -local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19 -+local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19-r:escape(string) -- URL-Escapes a string: +-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' -+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: +-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' -+local unescaped = r:unescape(url) -- returns 'http://foo.bar/1 2 3 & 4 + 5'-r:construct_url(string) -- Constructs an URL from an URI +-r:construct_url(string) -- Constructs an URL from an URI -local url = r:construct_url(r.uri) -+local url = r:construct_url(r.uri)-r.mpm_query(number) -- Queries the server for MPM information using ap_mpm_query: +-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 -+end-r:expr(string) -- Evaluates an expr string. +-r:expr(string) -- Evaluates an expr string. if r:expr("%{HTTP_HOST} =~ /^www/") then r:puts("This host name starts with www") -end -+end-r:scoreboard_process(a) -- Queries the server for information about the process at position-a: +r:scoreboard_process(a) -- Queries the server for information about the process at position+r:puts("Server 1 has PID " .. process.pid)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 processa: +r:scoreboard_worker(a, b) -- Queries for information about the worker thread,+r:puts("Server 1's thread 1 has thread ID " .. thread.tid .. " and is in " .. thread.status .. " status")b, in processa: 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:clock() -- Returns the current time with microsecond precision--r:requestbody(filename) -- Reads and returns the request body of a request. +-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:puts(input)-r:add_input_filter(filter_name) -- Adds 'filter_name' as an input filter -+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 +-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 -+end-r:loaded_modules() -- Returns a list of modules loaded by httpd: +-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 -+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: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: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_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: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: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:escape_logitem(string) -- Escapes a string for logging--r.strcmp_match(string, pattern) -- Checks if 'string' matches 'pattern' using strcmp_match (globs). +-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 -+end-r:set_keepalive() -- Sets the keepalive status for a request. Returns true if possible, false otherwise. -+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: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: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. +-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:custom_response(404, "Baleted!")-r.exists_config_define(string) -- Checks whether a configuration definition exists or not: +-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 -+end-r:state_query(string) -- Queries the server for state information -+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: +-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 -+end-r:regex(string, pattern [,flags]) -- Runs a regular expression match on a string, returning captures if matched: +-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 @@ -967,23 +880,17 @@ local matches = r:regex("FOO bar BAz", [[(foo) bar]], 1) -- Flags can be a bitwise combination of: -- 0x01: Ignore case --- 0x02: Multiline search -+-- 0x02: Multiline search-r.usleep(number_of_microseconds) -- Puts the script to sleep for a given number of microseconds. -+r.usleep(number_of_microseconds) -- Puts the script to sleep for a given number of microseconds.--r:dbacquire(dbType[, dbParams]) -- Acquires a connection to a database and returns a database class. - -- See 'Database connectivity' for details. -+r:dbacquire(dbType[, dbParams]) -- Acquires a connection to a database and returns a database class. + -- See 'Database connectivity' for details.--r:ivm_set("key", value) -- Set an Inter-VM variable to hold a specific value. +-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 @@ -1001,39 +908,27 @@ function handle(r) r:ivm_set("cached_data", foo) -- set it globally end r:puts("Cached data is: ", foo) -end -+end-r:htpassword(string [,algorithm [,cost]]) -- Creates a password hash from a string. +-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). -+ -- cost: only valid with BCRYPT algorithm (default = 5).-r:mkdir(dir [,mode]) -- Creates a directory and sets mode to optional mode paramter. -+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:mkrdir(dir [,mode]) -- Creates directories recursive and sets mode to optional mode paramter.--r:rmdir(dir) -- Removes a directory. -+r:rmdir(dir) -- Removes a directory.--r:touch(file [,mtime]) -- Sets the file modification time to current time or to optional mtime msec value. -+r:touch(file [,mtime]) -- Sets the file modification time to current time or to optional mtime msec value.--r:get_direntries(dir) -- Returns a table with all directory entries. +-r:get_direntries(dir) -- Returns a table with all directory entries. function handle(r) local dir = r.context_document_root @@ -1045,52 +940,38 @@ function handle(r) r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) ) end end -end -+end-r.date_parse_rfc(string) -- Parses a date/time string and returns seconds since epoche. -+r.date_parse_rfc(string) -- Parses a date/time string and returns seconds since epoche.--r:getcookie(key) -- Gets a HTTP cookie -+r:getcookie(key) -- Gets a HTTP cookie--r:setcookie(key, value, secure, expires) -- Sets a HTTP cookie, for instance: -r:setcookie("foo", "bar and stuff", false, os.time() + 86400) -+r:setcookie(key, value, secure, expires) -- Sets a HTTP cookie, for instance: +r:setcookie("foo", "bar and stuff", false, os.time() + 86400)--r:wsupgrade() -- Upgrades a connection to WebSockets if possible (and requested): +-r:wsupgrade() -- Upgrades a connection to WebSockets if possible (and requested): if r:wsupgrade() then -- if we can upgrade: r:wswrite("Welcome to websockets!") -- write something to the client r:wsclose() -- goodbye! -end -+end-r:wsread() -- Reads a WebSocket frame from a WebSocket upgraded connection (see above): +-r:wsread() -- Reads a WebSocket frame from a WebSocket upgraded connection (see above): local line, isFinal = r:wsread() -- isFinal denotes whether this is the final frame. -- If it isn't, then more frames can be read -r:wswrite("You wrote: " .. line) -+r:wswrite("You wrote: " .. line)-r:wswrite(line) -- Writes a frame to a WebSocket client: -r:wswrite("Hello, world!") -+r:wswrite(line) -- Writes a frame to a WebSocket client: +r:wswrite("Hello, world!")--r:wsclose() -- Closes a WebSocket request and terminates it for httpd: +r:wsclose() -- Closes a WebSocket request and terminates it for httpd: if r:wsupgrade() then r:wswrite("Write something: ") @@ -1098,16 +979,14 @@ if r:wsupgrade() then r:wswrite("You wrote: " .. line); r:wswrite("Goodbye!") r:wsclose() -end -+endLogging Functions
-- -- examples of logging messages
+-- examples of logging messages
r:trace1("This is a trace log message") -- trace1 through trace8 can be used
r:debug("This is a debug log message")
r:info("This is an info log message")
@@ -1155,8 +1034,7 @@ end function as buckets are sent down the filter chain. The core structure of such a function is: --function filter(r) +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: @@ -1182,8 +1060,7 @@ function filter(r) -- 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 -+end@@ -1195,8 +1072,7 @@ end as well as mod_dbd.@@ -267,20 +255,16 @@ UndefMacro DirGroup argument sont attribuées aux paramètres correspondants et substituées avant l'interprétation du texte de la macro. -The example below shows how to acquire a database handle and return information from a table:
--function handle(r) +function handle(r) -- Acquire a database handle local database, err = r:dbacquire("mysql", "server=localhost,user=someuser,pass=somepass,dbname=mydb") if not err then @@ -1214,32 +1090,26 @@ function handle(r) else r:puts("Could not connect to the database: " .. err) end -end -+endTo utilize
-mod_dbd, specifymod_dbdas the database type, or leave the field blank:- local database = r:dbacquire("mod_dbd") -+local database = r:dbacquire("mod_dbd")Database object and contained functions
The database object returned by
dbacquirehas the following methods:Normal select and query from a database:
---- Run a statement and return the number of rows affected: +-- Run a statement and return the number of rows affected: local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1") -- Run a statement and return a result set that can be used synchronously or async: -local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1") -+local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1")Using prepared statements (recommended):
---- Create and run a prepared statement: +-- 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 @@ -1249,21 +1119,17 @@ end local statement, errmsg = database:prepared(r, "someTag") if not errmsg then local result, errmsg = statement:select("John Doe", 123) -- inject the values "John Doe" and 123 into the statement -end - -+endEscaping values, closing databases etc:
---- Escape a value for use in a statement: +-- Escape a value for use in a statement: local escaped = database:escape(r, [["'|blabla]]) -- Close a database connection and free up handles: database:close() -- Check whether a database connection is up and running: -local connected = database:active() -+local connected = database:active()Working with result sets
@@ -1275,20 +1141,17 @@ local connected = database:active()result(-1)fetches the next available row in the set, asynchronously.
result(N)fetches row numberN, asynchronously: ---- fetch a result set using a regular query: +-- fetch a result set using a regular query: local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1") local rows = result(0) -- Fetch ALL rows synchronously local row = result(-1) -- Fetch the next available row, asynchronously -local row = result(1234) -- Fetch row number 1234, asynchronously -+local row = result(1234) -- Fetch row number 1234, asynchronouslyOne can construct a function that returns an iterative function to iterate over all rows in a synchronous or asynchronous way, depending on the async argument:
--function rows(resultset, async) +function rows(resultset, async) local a = 0 local function getnext() a = a + 1 @@ -1319,8 +1182,7 @@ if not err then .... end end -end -+endClosing a database connection
@@ -1332,16 +1194,14 @@ end if you leave the closing up to mod_lua. Essentially, the following two measures are the same: ---- Method 1: Manually close a handle +-- Method 1: Manually close a handle local database = r:dbacquire("mod_dbd") database:close() -- All done -- Method 2: Letting the garbage collector close it local database = r:dbacquire("mod_dbd") database = nil -- throw away the reference -collectgarbage() -- close the handle via GC -+collectgarbage() -- close the handle via GCPrecautions when working with databases
@@ -1370,21 +1230,17 @@ collectgarbage() -- close the handle via GCAfter a lua function has been registered as authorization provider, it can be used with the
-Requiredirective:-LuaRoot /usr/local/apache2/lua +-LuaRoot /usr/local/apache2/lua LuaAuthzProvider foo authz.lua authz_check_foo <Location /> Require foo johndoe -</Location> -+</Location>-require "apache2" +@@ -1412,11 +1268,9 @@ endrequire "apache2" function authz_check_foo(r, who) if r.user ~= who then return apache2.AUTHZ_DENIED return apache2.AUTHZ_GRANTED -end -+endIn general stat or forever is good for production, and stat or never for development.
-@@ -1595,12 +1443,9 @@ endExamples:
-LuaCodeCache stat +@@ -1453,8 +1307,7 @@ hook function usually returns OK, DECLINED, or HTTP_FORBIDDEN. a request. This can be used to implement arbitrary authentication and authorization checking. A very simple example: -Examples:
LuaCodeCache stat LuaCodeCache forever -LuaCodeCache never -+LuaCodeCache never-require 'apache2' +require 'apache2' -- fake authcheck hook -- If request has no auth info, set the response header and @@ -1483,8 +1336,7 @@ function authcheck_hook(r) return 401 end return apache2.OK -end -+end@@ -1552,12 +1404,9 @@ processingOrdering
The optional arguments "early" or "late" control when this script runs relative to other modules.
apache2.OKto tell httpd to log as normal.Example:
--LuaHookLog /path/to/script.lua logger -+LuaHookLog /path/to/script.lua logger---- /path/to/script.lua -- +-- /path/to/script.lua -- function logger(r) -- flip a coin: -- If 1, then we write to our own Lua log and tell httpd not to log @@ -1577,8 +1426,7 @@ function logger(r) r.uri = r.uri:gsub("somesecretstuff", "") -- sanitize the URI return apache2.OK -- tell httpd to log it. end -end -+endLike
-LuaHookTranslateNamebut 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 -+LuaHookMapToStorage /path/to/lua/script.lua check_cache--require"apache2" +@@ -1660,14 +1504,11 @@ endrequire"apache2" cached_files = {} function read_file(filename) @@ -1628,8 +1473,7 @@ function check_cache(r) end end return apache2.DECLINED -- If we had nothing to do, let others serve this. -end -+endExample:
--# httpd.conf -LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper -+# httpd.conf +LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper---- /scripts/conf/hooks.lua -- +-- /scripts/conf/hooks.lua -- require "apache2" function silly_mapper(r) if r.uri == "/" then @@ -1676,8 +1517,7 @@ function silly_mapper(r) else return apache2.DECLINED end -end -+end@@ -1760,15 +1596,12 @@ global variableContext
This directive is not valid in
-<Directory>,<Files>, or htaccess @@ -1702,12 +1542,9 @@ end 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 -+LuaHookTypeChecker /path/to/lua/script.lua type_checker-- function type_checker(r) +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 @@ -1716,8 +1553,7 @@ end end return apache2.DECLINED - end -+ endbucketholds the buckets as they are passed onto the Lua script: --LuaInputFilter myInputFilter /www/filter.lua input_filter +-LuaInputFilter myInputFilter /www/filter.lua input_filter <FilesMatch "\.lua> SetInputFilter myInputFilter -</FilesMatch> -+</FilesMatch>---[[ +--[[ Example input filter that converts all POST data to uppercase. ]]-- function input_filter(r) @@ -1780,21 +1613,18 @@ function input_filter(r) end -- No more buckets available. coroutine.yield("&filterSignature=1234") -- Append signature at the end -end -+endThe input filter supports denying/skipping a filter if it is deemed unwanted:
--function input_filter(r) +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 -+endSee "Modifying contents with Lua @@ -1818,18 +1648,14 @@ filters" for more information. match groups into both the file path and the function name. Be careful writing your regular expressions to avoid security issues.
-Examples:
- LuaMapHandler /(\w+)/(\w+) /scripts/$1.lua handle_$2 -+Examples:
LuaMapHandler /(\w+)/(\w+) /scripts/$1.lua handle_$2This would match uri's such as /photos/show?id=9 to the file /scripts/photos.lua and invoke the handler function handle_show on the lua vm after loading that file.
-- LuaMapHandler /bingo /scripts/wombat.lua -+LuaMapHandler /bingo /scripts/wombat.luaThis would invoke the "handle" function, which is the default if no specific function name is @@ -1855,15 +1681,12 @@ global variable
-bucketholds the buckets as they are passed onto the Lua script:-LuaOutputFilter myOutputFilter /www/filter.lua output_filter +-LuaOutputFilter myOutputFilter /www/filter.lua output_filter <FilesMatch "\.lua> SetOutputFilter myOutputFilter -</FilesMatch> -+</FilesMatch>---[[ +--[[ Example output filter that escapes all HTML entities in the output ]]-- function output_filter(r) @@ -1874,22 +1697,19 @@ function output_filter(r) coroutine.yield(output) -- Send converted data down the chain end -- No more buckets available. -end -+endAs with the input filter, the output filter supports denying/skipping a filter if it is deemed unwanted:
--function output_filter(r) +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 -+end@@ -363,8 +355,7 @@ function translate_name(r) end -- on ne gère pas cette URL et on donne sa chance à un autre module return apache2.DECLINED -end - +end @@ -387,8 +378,7 @@ function translate_name(r) return apache2.DECLINED end return apache2.DECLINED -end - +endLua filters with
mod_filterWhen a Lua filter is used as the underlying provider via the @@ -1933,10 +1753,8 @@ information. conventions as lua. This just munges the package.path in the lua vms.
-diff --git a/docs/manual/mod/mod_lua.html.fr b/docs/manual/mod/mod_lua.html.fr index b24d04a9f6..db084093e7 100644 --- a/docs/manual/mod/mod_lua.html.fr +++ b/docs/manual/mod/mod_lua.html.fr @@ -106,9 +106,7 @@ fonctionnement interne de httpd.Examples:
-LuaPackagePath /scripts/lib/?.lua -LuaPackagePath /scripts/lib/?/init.lua -+Examples:
LuaPackagePath /scripts/lib/?.lua +LuaPackagePath /scripts/lib/?/init.luaLa directive de base pour le chargement du module est
-- LoadModule lua_module modules/mod_lua.so -+LoadModule lua_module modules/mod_lua.so@@ -116,9 +114,7 @@ fonctionnement interne de httpd.
lua-scriptqui peut être utilisé avec une directiveAddHandler: --AddHandler lua-script .lua -+AddHandler lua-script .lua@@ -179,8 +175,7 @@ function handle(r) return 501 end return apache2.OK -end - +end
@@ -234,18 +229,15 @@ function authz_check_foo(r, ip, user) else return apache2.AUTHZ_DENIED end -end - +end
La configuration suivante enregistre cette fonction en tant que fournisseur
-foo, et la configure por l'URL/:-LuaAuthzProvider foo authz_provider.lua authz_check_foo +LuaAuthzProvider foo authz_provider.lua authz_check_foo <Location /> Require foo 10.1.2.3 john_doe -</Location> -+</Location>@@ -717,8 +707,7 @@ endL'objet request_rec possède (au minimum) les méthodes suivantes :
--r:flush() -- vide le tampon de sortie +-r:flush() -- vide le tampon de sortie -- Renvoie true si le vidage a été effectué avec succès, false dans le cas contraire. @@ -726,185 +715,141 @@ while nous_avons_des_donn r:puts("Bla bla bla\n") -- envoi des données à envoyer vers le tampon r:flush() -- vidage du tampon (envoi au client) r.usleep(500000) -- mise en attente pendant 0.5 secondes et bouclage -end -+end-r:addoutputfilter(name|function) -- ajoute un filtre en sortie +-r:addoutputfilter(name|function) -- ajoute un filtre en sortie -r:addoutputfilter("fooFilter") -- insère le filtre fooFilter dans le flux de sortie -+r:addoutputfilter("fooFilter") -- insère le filtre fooFilter dans le flux de sortie-r:sendfile(filename) -- envoie un fichier entier au client en +-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 -+end-r:parseargs() -- renvoie deux tables : une table standard de couples +-r:parseargs() -- renvoie deux tables : une table standard de couples clé/valeur pour les données GET simples, et une autre pour les données multivaluées (par exemple foo=1&foo=2&foo=3) : local GET, GETMULTI = r:parseargs() -r:puts("Votre nom est : " .. GET['name'] or "Unknown") -+r:puts("Votre nom est : " .. GET['name'] or "Unknown")-r:parsebody()([sizeLimit]) -- interprète le corps de la requête +-r:parsebody()([sizeLimit]) -- interprète le corps de la requête en tant que POST et renvoie deux tables lua, comme r:parseargs(). Un nombre optionnel peut être fourni pour spécifier le nombre maximal d'octets à interpréter. La valeur par défaut est 8192. local POST, POSTMULTI = r:parsebody(1024*1024) -r:puts("Votre nom est : " .. POST['name'] or "Unknown") -+r:puts("Votre nom est : " .. POST['name'] or "Unknown")-r:puts("bonjour", " le monde", "!") -- affichage dans le corps de la réponse -+r:puts("bonjour", " le monde", "!") -- affichage dans le corps de la réponse--r:write("une simple chaîne") -- affichage dans le -corps de la réponse -+r:write("une simple chaîne") -- affichage dans le +corps de la réponse--r:escape_html("<html>test</html>") -- Echappe le -code HTML et renvoie le résultat -+r:escape_html("<html>test</html>") -- Echappe le +code HTML et renvoie le résultat--r:base64_encode(string) -- Encode une chaîne à l'aide du +-r:base64_encode(string) -- Encode une chaîne à l'aide du standard de codage Base64. -local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q= -+local encoded = r:base64_encode("This is a test") -- returns VGhpcyBpcyBhIHRlc3Q=-r:base64_decode(string) -- Décode une chaîne codée en Base64. +-r:base64_decode(string) -- Décode une chaîne codée en Base64. -local decoded = r:base64_decode("VGhpcyBpcyBhIHRlc3Q=") -- returns 'This is a test' -+local decoded = r:base64_decode("VGhpcyBpcyBhIHRlc3Q=") -- returns 'This is a test'-r:md5(string) -- Calcule et renvoie le condensé MD5 d'une chaîne +-r:md5(string) -- Calcule et renvoie le condensé MD5 d'une chaîne en mode binaire (binary safe). -local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339 -+local hash = r:md5("This is a test") -- returns ce114e4501d2f4e2dcea3e17b546f339-r:sha1(string) -- Calcule et renvoie le condensé SHA1 d'une chaîne +-r:sha1(string) -- Calcule et renvoie le condensé SHA1 d'une chaîne en mode binaire (binary safe). -local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19 -+local hash = r:sha1("This is a test") -- returns a54d88e06612d820bc3be72877c74f257b561b19-r:escape(string) -- Echappe une chaîne de type URL. +-r:escape(string) -- Echappe une chaîne de type URL. local url = "http://foo.bar/1 2 3 & 4 + 5" -local escaped = r:escape(url) -- renvoie 'http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5' -+local escaped = r:escape(url) -- renvoie 'http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5'-r:unescape(string) -- Déséchappe une chaîne de type URL. +-r:unescape(string) -- Déséchappe une chaîne de type URL. local url = "http%3a%2f%2ffoo.bar%2f1+2+3+%26+4+%2b+5" -local unescaped = r:unescape(url) -- renvoie 'http://foo.bar/1 2 3 & 4 + 5' -+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 +-r:construct_url(string) -- Construit une URL à partir d'un URI -local url = r:construct_url(r.uri) -+local url = r:construct_url(r.uri)-r.mpm_query(number) -- Interroge le serveur à propos de son +-r.mpm_query(number) -- Interroge le serveur à propos de son module MPM via la requête ap_mpm_query. local mpm = r.mpm_query(14) if mpm == 1 then r:puts("Ce serveur utilise le MPM Event") -end -+end-r:expr(string) -- Evalue une chaîne de type expr. +-r:expr(string) -- Evalue une chaîne de type expr. if r:expr("%{HTTP_HOST} =~ /^www/") then r:puts("Ce nom d'hôte commence par www") -end -+end-r:scoreboard_process(a) -- Interroge le serveur à propos du +-r:scoreboard_process(a) -- Interroge le serveur à propos du processus à la position+r:puts("Le serveur 1 a comme PID " .. process.pid)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 +-r:scoreboard_worker(a, b) -- Interroge le serveur à propos du thread+état est " .. thread.status)b, dans le processusa. local thread = r:scoreboard_worker(1, 1) r:puts("L'ID du thread 1 du serveur 1 est " .. thread.tid .. " et son -état est " .. thread.status) --r:clock() -- Renvoie l'heure courante avec une précision d'une -microseconde. -+r:clock() -- Renvoie l'heure courante avec une précision d'une +microseconde.--r:requestbody(filename) -- Lit et renvoie le corps d'une requête. Si +-r:requestbody(filename) -- Lit et renvoie le corps d'une requête. Si 'filename' est spécifié, le corps de requête n'est pas renvoyé, mais sauvegardé dans le fichier correspondant. local input = r:requestbody() r:puts("Vous m'avez envoyé le corps de requête suivant :\n") -r:puts(input) -+r:puts(input)-r:add_input_filter(filter_name) -- Ajoute le filtre en entrée -'filter_name'. -+r:add_input_filter(filter_name) -- Ajoute le filtre en entrée +'filter_name'.--r:module_info(module_name) -- Interroge le serveur à propos d'un +-r:module_info(module_name) -- Interroge le serveur à propos d'un module. local mod = r.module_info("mod_lua.c") @@ -912,135 +857,101 @@ if mod then for k, v in pairs(mod.commands) do r:puts( ("%s: %s\n"):format(k,v)) -- affiche toutes les directives implémentées par ce module end -end -+end-r:loaded_modules() -- Renvoie une liste des modules chargés par +-r:loaded_modules() -- Renvoie une liste des modules chargés par httpd. for k, module in pairs(r:loaded_modules()) do r:puts("J'ai chargé le module " .. module .. "\n") -end -+end-r:runtime_dir_relative(filename) -- Génère le nom d'un fichier run-time +-r:runtime_dir_relative(filename) -- Génère le nom d'un fichier run-time (par exemple la mémoire partagée "file") relativement au répertoire de -run-time. -+run-time.-r:server_info() -- Renvoie une table contenant des informations +-r:server_info() -- Renvoie une table contenant des informations à propos du serveur, comme le nom de l'exécutable httpd, le -module mpm utilisé, etc... -+module mpm utilisé, etc...-r:set_document_root(file_path) -- Définit la racine des -documents pour la requête à file_path. -+r:set_document_root(file_path) -- Définit la racine des +documents pour la requête à file_path.--r:add_version_component(component_string) -- Ajoute un élément à -la bannière du serveur. -+r:add_version_component(component_string) -- Ajoute un élément à +la bannière du serveur.--r:set_context_info(prefix, docroot) -- Définit le préfixe et la -racine des documents du contexte pour une requête. -+r:set_context_info(prefix, docroot) -- Définit le préfixe et la +racine des documents du contexte pour une requête.--r:os_escape_path(file_path) -- Convertit un chemin du système de -fichiers en URL indépendamment du système d'exploitation. -+r:os_escape_path(file_path) -- Convertit un chemin du système de +fichiers en URL indépendamment du système d'exploitation.--r:escape_logitem(string) -- Echappe une chaîne pour -journalisation. -+r:escape_logitem(string) -- Echappe une chaîne pour +journalisation.--r.strcmp_match(string, pattern) -- Vérifie si 'string' correspond à +-r.strcmp_match(string, pattern) -- Vérifie si 'string' correspond à 'pattern' via la fonction strcmp_match (GLOBs). Par exemple, est-ce que 'www.example.com' correspond à '*.example.com' ? local match = r.strcmp_match("foobar.com", "foo*.com") if match then r:puts("foobar.com matches foo*.com") -end -+end-r:set_keepalive() -- Définit l'état de persistance d'une +-r:set_keepalive() -- Définit l'état de persistance d'une requête. Renvoie true dans la mesure du possible, false dans le -cas contraire. -+cas contraire.-r:make_etag() -- Génère et renvoie le etag pour la requête -courante. -+r:make_etag() -- Génère et renvoie le etag pour la requête +courante.--r:send_interim_response(clear) -- Renvoie une réponse d'intérim (1xx) au +-r:send_interim_response(clear) -- Renvoie une réponse d'intérim (1xx) au client. Si 'clear' est vrai, les en-têtes disponibles seront envoyés et -effacés. -+effacés.-r:custom_response(status_code, string) -- Génère et définit une réponse +-r:custom_response(status_code, string) -- Génère et définit une réponse personnalisée pour un code d'état particulier. Le fonctionnement est très proche de celui de la directive ErrorDocument. -r:custom_response(404, "Baleted!") -+r:custom_response(404, "Baleted!")-r.exists_config_define(string) -- Vérifie si une définition de +-r.exists_config_define(string) -- Vérifie si une définition de configuration existe. if r.exists_config_define("FOO") then r:puts("httpd a probablement été lancé avec l'option -DFOO, ou FOO a été défini dans la configuration") -end -+end-r:state_query(string) -- Interroge le serveur à propos de son -état. -+r:state_query(string) -- Interroge le serveur à propos de son +état.--r:stat(filename [,wanted]) -- Exécute stat() sur un fichier, et renvoie +-r:stat(filename [,wanted]) -- Exécute stat() sur un fichier, et renvoie une table contenant des informations à propos de ce fichier. local info = r:stat("/var/www/foo.txt") if info then r:puts("Ce fichier existe et a été modifié pour la dernière fois à : " .. info.modified) -end -+end-r:regex(string, pattern [,flags]) -- Exécute une recherche à base +-r:regex(string, pattern [,flags]) -- Exécute une recherche à base d'expression rationnelle sur une chaîne, et renvoie les éventuelles correspondances trouvées. @@ -1055,24 +966,18 @@ 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 -+-- 0x02: recherche multiligne-r.usleep(microsecondes) -- Interrompt l'exécution du script pendant le nombre de microsecondes spécifié. -+r.usleep(microsecondes) -- Interrompt l'exécution du script pendant le nombre de microsecondes spécifié.--r:dbacquire(dbType[, dbParams]) -- Acquiert une connexion à une +-r:dbacquire(dbType[, dbParams]) -- Acquiert une connexion à une base de données et renvoie une classe database. Voir 'Connectivité aux bases de données' pour plus de -détails. -+détails.-r:ivm_set("key", value) -- Défini une variable Inter-VM avec une valeur spécifique. +-r:ivm_set("key", value) -- Défini une variable Inter-VM avec une valeur spécifique. -- Ces valeurs sont conservées même si la VM est -- arrêtée ou non utilisée, et ne doivent donc être -- utilisées que si MaxConnectionsPerChild > 0. @@ -1096,38 +1001,26 @@ function handle(r) r:ivm_set("cached_data", foo) -- définition globale de la variable end r:puts("La donnée en cache est : ", foo) -end -+end-r:htpassword(string [,algorithm [,cost]]) -- Génère un hash de mot de passe à partir d'une chaîne. +-r:htpassword(string [,algorithm [,cost]]) -- Génère un hash de mot de passe à partir d'une chaîne. -- algorithm: 0 = APMD5 (défaut), 1 = SHA, 2 = BCRYPT, 3 = CRYPT. - -- cost: ne s'utilise qu'avec l'algorythme BCRYPT (défaut = 5). -+ -- cost: ne s'utilise qu'avec l'algorythme BCRYPT (défaut = 5).-r:mkdir(dir [,mode]) -- Crée un répertoire et définit son mode via le paramètre optionnel mode. -+r:mkdir(dir [,mode]) -- Crée un répertoire et définit son mode via le paramètre optionnel mode.--r:mkrdir(dir [,mode]) -- Crée des répertoires de manière récursive et définit leur mode via le paramètre optionnel mode. -+r:mkrdir(dir [,mode]) -- Crée des répertoires de manière récursive et définit leur mode via le paramètre optionnel mode.--r:rmdir(dir) -- Supprime un répertoire. -+r:rmdir(dir) -- Supprime un répertoire.--r:touch(file [,mtime]) -- Définit la date de modification d'un fichier à la date courante ou à la valeur optionnelle mtime en msec. -+r:touch(file [,mtime]) -- Définit la date de modification d'un fichier à la date courante ou à la valeur optionnelle mtime en msec.--r:get_direntries(dir) -- Renvoie une table contenant toutes les entrées de répertoires. +-r:get_direntries(dir) -- Renvoie une table contenant toutes les entrées de répertoires. -- Renvoie un chemin sous forme éclatée en chemin, fichier, extension function handle(r) @@ -1140,52 +1033,38 @@ function handle(r) r:puts( ("%s %s %10i %s\n"):format(ftype, mtime, info.size, f) ) end end -end -+end-r.date_parse_rfc(string) -- Interprète une chaîne date/heure et renvoie l'équivalent en secondes depuis epoche. -+r.date_parse_rfc(string) -- Interprète une chaîne date/heure et renvoie l'équivalent en secondes depuis epoche.--r:getcookie(key) -- Obtient un cookie HTTP -+r:getcookie(key) -- Obtient un cookie HTTP--r:setcookie(key, value, secure, expires) -- Définit un cookie HTTP, par exemple : -r:setcookie("foo", "bar and stuff", false, os.time() + 86400) -+r:setcookie(key, value, secure, expires) -- Définit un cookie HTTP, par exemple : +r:setcookie("foo", "bar and stuff", false, os.time() + 86400)--r:wsupgrade() -- Met à jour une connexion vers les WebSockets si possible (et si demandé) : +-r:wsupgrade() -- Met à jour une connexion vers les WebSockets si possible (et si demandé) : if r:wsupgrade() then -- si la mise à jour est possible : r:wswrite("Bienvenue dans les websockets!") -- écrit quelque chose à l'intention du client r:wsclose() -- Au revoir ! -end -+end-r:wsread() -- Lit un cadre de websocket depuis une connexion vers websocket mise à jour (voir ci-dessus) : +-r:wsread() -- Lit un cadre de websocket depuis une connexion vers websocket mise à jour (voir ci-dessus) : local line, isFinal = r:wsread() -- isFinal indique s'il s'agit du cadre final. -- dans le cas contraire, on peut lire les cadres suivants -r:wswrite("Vous avez écrit : " .. line) -+r:wswrite("Vous avez écrit : " .. line)-r:wswrite(line) -- écrit un cadre vers un client WebSocket : -r:wswrite("Bonjour le Monde !") -+r:wswrite(line) -- écrit un cadre vers un client WebSocket : +r:wswrite("Bonjour le Monde !")--r:wsclose() -- ferme une requête WebSocket et l'achève pour httpd : +r:wsclose() -- ferme une requête WebSocket et l'achève pour httpd : if r:wsupgrade() then r:wswrite("Ecrire quelque chose : ") @@ -1193,16 +1072,14 @@ if r:wsupgrade() then r:wswrite("Vous avez écrit : " .. line); r:wswrite("Au revoir !") r:wsclose() -end -+endFonctions de journalisation
-- -- exemples de messages de journalisation +-- exemples de messages de journalisation r:trace1("Ceci est un message de journalisation de niveau trace") -- les niveaux valides vont de trace1 à trace8
r:debug("Ceci est un message de journalisation de niveau debug")
@@ -1252,8 +1129,7 @@ contenu suivant : paquets de données sont envoyés à la chaîne de filtrage. La structure de base d'une telle fonction est : --function filter(r) +function filter(r) -- Nous indiquons tout d'abord que nous sommes prêts à recevoir des -- blocs de données. -- Avant ceci, nous pouvons définir notre environnement, tester @@ -1283,8 +1159,7 @@ function filter(r) -- arrêt. Les filtres d'entrée comme de sortie peuvent servir à ajouter des éléments à la fin -- des données à cette étape. coroutine.yield([optional footer to be appended to the content]) -end -+end@@ -1297,8 +1172,7 @@ commandes aupr@@ -153,8 +147,7 @@ de l'entourer d'accolades afin d'L'exemple suivant montre comment se connecter à une base de données et extraire des informations d'une table :
--function handle(r) +function handle(r) -- connexion à la base de données local database, err = r:dbacquire("mysql", "server=localhost,user=someuser,pass=somepass,dbname=mydb") if not err then @@ -1316,17 +1190,14 @@ function handle(r) else r:puts("Connexion à la base de données impossible : " .. err) end -end -+endPour utiliser
-mod_dbd, spécifiezmod_dbdcomme type de base de données, ou laissez le champ vide :- local database = r:dbacquire("mod_dbd") -+local database = r:dbacquire("mod_dbd")L'objet database et ses méthodes
@@ -1334,19 +1205,16 @@ vide : les méthodes suivantes :Sélection normale et requête vers une base de données :
---- Exécution d'une requête et renvoie du nombre d'enregistrements +-- Exécution d'une requête et renvoie du nombre d'enregistrements affectés : local affected, errmsg = database:query(r, "DELETE FROM `tbl` WHERE 1") -- Exécution d'une requête et renvoie du résultat qui peut être utilisé en mode synchrone ou asynchrone : -local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1") -+local result, errmsg = database:select(r, "SELECT * FROM `people` WHERE 1")Utilisation de requêtes préparées (recommandé) :
---- Création et exécution d'une requête préparée : +-- Création et exécution d'une requête préparée : local statement, errmsg = database:prepare(r, "DELETE FROM `tbl` WHERE `age` > %u") if not errmsg then local result, errmsg = statement:query(20) -- exécute la requête pour age > 20 @@ -1356,14 +1224,11 @@ end local statement, errmsg = database:prepared(r, "someTag") if not errmsg then local result, errmsg = statement:select("John Doe", 123) -- injecte les valeurs "John Doe" et 123 dans la requête -end - -+endEchappement de valeurs, fermeture de la base données, etc...
---- Echappe une valeur pour pouvoir l'utiliser dans une requête : +-- Echappe une valeur pour pouvoir l'utiliser dans une requête : local escaped = database:escape(r, [["'|blabla]]) -- Ferme une base de données et libère les liens vers cette dernière : @@ -1371,8 +1236,7 @@ database:close() -- Vérifie si une connexion à une base de données est en service et opérationnelle : -local connected = database:active() -+local connected = database:active()Travail avec les jeux d'enregistrements renvoyés par les requêtes
@@ -1388,21 +1252,18 @@ mode asynchrone.
result(N)sélectionne l'enregistrement numéroNen mode asynchrone. ---- extrait un jeu d'enregistrements via une requête régulière : +-- extrait un jeu d'enregistrements via une requête régulière : local result, err = db:select(r, "SELECT * FROM `tbl` WHERE 1") local rows = result(0) -- sélectionne tous les enregistrements en mode synchrone local row = result(-1) -- sélectionne le prochain enregistrement disponible en mode asynchrone -local row = result(1234) -- sélectionne l'enregistrement 1234 en mode asynchrone -+local row = result(1234) -- sélectionne l'enregistrement 1234 en mode asynchroneIl est possible de construire une fonction qui renvoie une fonction itérative permettant de traiter tous les enregistrement en mode synchrone ou asynchrone selon la valeur de l'argument async :
--function rows(resultset, async) +function rows(resultset, async) local a = 0 local function getnext() a = a + 1 @@ -1433,8 +1294,7 @@ if not err then .... end end -end -+endFermeture d'une connexion à une base de données
@@ -1447,16 +1307,14 @@ que r pas avoir trop de connexions vers la base de données inutilisées. Les deux mesures suivantes sont pratiquement identiques : ---- Méthode 1 : fermeture manuelle de la connexion +-- Méthode 1 : fermeture manuelle de la connexion local database = r:dbacquire("mod_dbd") database:close() -- c'est tout -- Méthode 2 : on laisse le collecteur de résidus la fermer local database = r:dbacquire("mod_dbd") database = nil -- on coupe le lien -collectgarbage() -- fermeture de la connexion par le collecteur de résidus -+collectgarbage() -- fermeture de la connexion par le collecteur de résidusPrécautions à prendre lorsque l'on travaille avec les bases @@ -1490,21 +1348,17 @@ le cas des requ d'autorisation, elle peut être appelée via la directive
Require: --LuaRoot /usr/local/apache2/lua +-LuaRoot /usr/local/apache2/lua LuaAuthzProvider foo authz.lua authz_check_foo <Location /> Require foo johndoe -</Location> -+</Location>-require "apache2" +@@ -1533,11 +1387,9 @@ end serveur en production, et les valeurs stat ou never pour un serveur en développement. -require "apache2" function authz_check_foo(r, who) if r.user ~= who then return apache2.AUTHZ_DENIED return apache2.AUTHZ_GRANTED -end -+enddiff --git a/docs/manual/mod/mod_macro.html.fr b/docs/manual/mod/mod_macro.html.fr index 9bae46c197..2133d64eb7 100644 --- a/docs/manual/mod/mod_macro.html.fr +++ b/docs/manual/mod/mod_macro.html.fr @@ -66,8 +66,7 @@ variables pour les parties qui devrontExemples :
-LuaCodeCache stat +@@ -1581,8 +1433,7 @@ traitement de la requ implémenter une vérification arbitraire de l'authentification et de l'autorisation. Voici un exemple très simple : -Exemples :
LuaCodeCache stat LuaCodeCache forever -LuaCodeCache never -+LuaCodeCache never-require 'apache2' +require 'apache2' -- fonction d'accroche authcheck fictive -- Si la requête ne contient aucune donnée d'authentification, l'en-tête @@ -1613,8 +1464,7 @@ function authcheck_hook(r) return 401 end return apache2.OK -end -+end@@ -1740,12 +1586,9 @@ traitement de la requ phase map-to-storage du traitement de la requête. Les modules comme mod_cache agissent pendant cette phase, ce qui permet de présenter un exemple intéressant de ce que l'on peut faire ici : -Ordonnancement
Les arguments optionnels "early" ou "late" permettent de contrôler le moment auquel ce script @@ -1692,12 +1542,9 @@ traitement d'une requ normale.
Exemple :
--LuaHookLog /path/to/script.lua logger -+LuaHookLog /path/to/script.lua logger---- /path/to/script.lua -- +-- /path/to/script.lua -- function logger(r) -- on joue à pile ou face : -- Si on obtient 1, on écrit dans notre propre journal Lua et on dit @@ -1719,8 +1566,7 @@ function logger(r) r.uri = r.uri:gsub("somesecretstuff", "") -- nettoie les données return apache2.OK -- et httpd doit alors les enregistrer. end -end -+end- LuaHookMapToStorage /path/to/lua/script.lua check_cache -+LuaHookMapToStorage /path/to/lua/script.lua check_cache--require"apache2" +@@ -1808,14 +1650,11 @@ version 2.3.15 du serveur HTTP Apache.require"apache2" cached_files = {} function read_file(filename) @@ -1773,8 +1616,7 @@ function check_cache(r) end end return apache2.DECLINED -- If we had nothing to do, let others serve this. -end -+endExemple :
--# httpd.conf -LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper -+# httpd.conf +LuaHookTranslateName /scripts/conf/hooks.lua silly_mapper---- /scripts/conf/hooks.lua -- +-- /scripts/conf/hooks.lua -- require "apache2" function silly_mapper(r) if r.uri == "/" then @@ -1824,8 +1663,7 @@ function silly_mapper(r) else return apache2.DECLINED end -end -+end@@ -267,20 +253,16 @@ UndefMacro RestrictedAccessPolicy associated to their corresponding initial parameters and are substituted before processing. -Contexte
Cette directive ne peut être @@ -1893,15 +1731,12 @@ globale
-bucketcontient les paquets de donn sont transmis au script Lua :-LuaInputFilter myInputFilter /www/filter.lua input_filter +-LuaInputFilter myInputFilter /www/filter.lua input_filter <FilesMatch "\.lua> SetInputFilter myInputFilter -</FilesMatch> -+</FilesMatch>---[[ +--[[ Exemple de filtre en entrée qui convertit toutes les données POST en majuscules. ]]-- @@ -1914,22 +1749,19 @@ function input_filter(r) end -- plus aucune donnée à traiter. coroutine.yield("&filterSignature=1234") -- Ajoute une signature à la fin -end -+endLe filtre en entrée peut interdire ou sauter un filtre s'il est considéré comme indésirable :
--function input_filter(r) +function input_filter(r) if not good then return -- Empêche tout simplement le filtrage et transmet le contenu original end coroutine.yield() -- attend des paquets de données ... -- insert les filtres ici -end -+endVoir "Modification de contenu avec les @@ -1955,18 +1787,14 @@ filtres Lua" pour plus de d d'interpolation dans le chemin du fichier et le nom de la fonction. Prenez garde aux problèmes de sécurité en écrivant vos expressions rationnelles.
-@@ -244,10 +232,8 @@ UndefMacro DirGroupExemples :
- LuaMapHandler /(\w+)/(\w+) /scripts/$1.lua handle_$2 -+Exemples :
LuaMapHandler /(\w+)/(\w+) /scripts/$1.lua handle_$2Cette directive va faire correspondre des uri comme /photos/show?id=9 au fichier /scripts/photos.lua, et invoquera la fonction de gestionnaire handle_show au niveau de la vm lua après chargement de ce fichier.
-- LuaMapHandler /bingo /scripts/wombat.lua -+LuaMapHandler /bingo /scripts/wombat.luaCette directive invoquera la fonction "handle" qui est la valeur par défaut si aucun nom de fonction spécifique n'est @@ -1995,15 +1823,12 @@ globale
-bucketcontient les paquets de donn sont transmis au script Lua :-LuaOutputFilter myOutputFilter /www/filter.lua output_filter +-LuaOutputFilter myOutputFilter /www/filter.lua output_filter <FilesMatch "\.lua> SetOutputFilter myOutputFilter -</FilesMatch> -+</FilesMatch>---[[ +--[[ Exemple de filtre en sortie qui échappe toutes les entités HTML en sortie ]]-- @@ -2014,22 +1839,19 @@ function output_filter(r) coroutine.yield(output) -- Envoie les données traitées à la chaîne end -- plus aucune donnée à traiter. -end -+endComme les filres en entrée, le filtre en sortie peut interdire ou sauter un filtre s'il est considéré comme indésirable :
--function output_filter(r) +function output_filter(r) if not r.content_type:match("text/html") then return -- Empêche tout simplement le filtrage et transmet le contenu original end coroutine.yield() -- attend des paquets de données ... -- insert les filtres ici -end -+end@@ -146,8 +140,7 @@ surround the parameter in braces, to avoid confusion:Les filtres Lua avec
mod_filterLorsqu'on utilise un filtre Lua comme fournisseur sous-jacent via la @@ -2074,10 +1896,8 @@ filtres Lua" pour plus de d chemins de recherche du module lua. Elle suit les mêmes conventions que lua. Ceci modifie le package.path dans les vms lua.
-diff --git a/docs/manual/mod/mod_macro.html.en b/docs/manual/mod/mod_macro.html.en index 1dfea8717c..d90f913795 100644 --- a/docs/manual/mod/mod_macro.html.en +++ b/docs/manual/mod/mod_macro.html.en @@ -64,8 +64,7 @@ for those parts that will need to be substituted.Exemples :
-LuaPackagePath /scripts/lib/?.lua -LuaPackagePath /scripts/lib/?/init.lua -+Exemples :
LuaPackagePath /scripts/lib/?.lua +LuaPackagePath /scripts/lib/?/init.luaFor example, you might use a macro to define a
-<VirtualHost>block, in order to define multiple similar virtual hosts:-<Macro VHost $name $domain> +<Macro VHost $name $domain> <VirtualHost *:80> ServerName $domain ServerAlias www.$domain @@ -74,8 +73,7 @@ multiple similar virtual hosts: ErrorLog /var/log/httpd/$name.error_log CustomLog /var/log/httpd/$name.access_log combined </VirtualHost> -</Macro> -+</Macro>Macro names are case-insensitive, like httpd configuration @@ -84,13 +82,11 @@ directives. However, variable names are case sensitive.
You would then invoke this macro several times to create virtual hosts:
--Use VHost example example.com +Use VHost example example.com Use VHost myhost hostname.org Use VHost apache apache.org -UndefMacro VHost -+UndefMacro VHostAt server startup time, each of these
Use@@ -128,11 +124,9 @@ confusion, the longest possible parameter name is used.If you want to use a value within another string, it is useful to surround the parameter in braces, to avoid confusion:
--<Macro DocRoot ${docroot}> +<Macro DocRoot ${docroot}> DocumentRoot /var/www/${docroot}/htdocs -</Macro> -+</Macro>A common usage of
-mod_macrois for the creation of dynamically-generated virtual hosts.-## Define a VHost Macro for repetitive configurations +@@ -184,8 +176,7 @@ Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs avoids confusion in a complex configuration file where there may be conflicts in variable names. -## Define a VHost Macro for repetitive configurations <Macro VHost $host $port $dir> Listen $port @@ -172,8 +165,7 @@ dynamically-generated virtual hosts. Use VHost www.apache.org 80 /vhosts/apache/htdocs Use VHost example.org 8080 /vhosts/example/htdocs -Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs -+Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs-<Macro DirGroup $dir $group> +@@ -220,15 +210,13 @@ UndefMacro DirGroup with such characters. -<Macro DirGroup $dir $group> <Directory $dir> Require group $group </Directory> @@ -194,8 +185,7 @@ conflicts in variable names. Use DirGroup /www/apache/private private Use DirGroup /www/apache/server admin -UndefMacro DirGroup -+UndefMacro DirGroup-<Macro LocalAccessPolicy> +<Macro LocalAccessPolicy> Require ip 10.2.16.0/24 </Macro> <Macro RestrictedAccessPolicy $ipnumbers> Require ip $ipnumbers -</Macro> -+</Macro>The
-UndefMacrodirective undefines a macro which has been defined before hand.-UndefMacro LocalAccessPolicy -UndefMacro RestrictedAccessPolicy -+UndefMacro LocalAccessPolicy +UndefMacro RestrictedAccessPolicy-Use LocalAccessPolicy +Use LocalAccessPolicy ... -Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24" -+Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"is equivalent, with the macros defined above, to:
--Require ip 10.2.16.0/24 +Require ip 10.2.16.0/24 ... -Require ip 192.54.172.0/24 192.54.148.0/24 -+Require ip 192.54.172.0/24 192.54.148.0/24<VirtualHost>, afin de pouvoir définir de nombreux serveurs virtuels similaires : --<Macro VHost $name $domain> +<Macro VHost $name $domain> <VirtualHost *:80> ServerName $domain ServerAlias www.$domain @@ -76,8 +75,7 @@ d ErrorLog /var/log/httpd/$name.error_log CustomLog /var/log/httpd/$name.access_log combined </VirtualHost> -</Macro> -+</Macro>Comme les directives de configuration httpd, les noms des macros sont @@ -87,13 +85,11 @@ sensibles.
Vous pouvez alors invoquer cette macro autant de fois que vous le voulez pour créer des serveurs virtuels
--Use VHost example example.com +Use VHost example example.com Use VHost myhost hostname.org Use VHost apache apache.org -UndefMacro VHost -+UndefMacro VHostAu démarrage du serveur, chacune de ces invocations @@ -135,11 +131,9 @@ param
Si vous désirez insérer une valeur dans une chaîne, il est conseillé de l'entourer d'accolades afin d'éviter toute confusion :
--<Macro DocRoot ${docroot}> +<Macro DocRoot ${docroot}> DocumentRoot /var/www/${docroot}/htdocs -</Macro> -+</Macro>Un exemple typique d'utilisation de
-mod_macroest la création dynamique de serveurs virtuels.-## Définition d'une macro VHost pour les configurations répétitives +@@ -192,8 +184,7 @@ l'avoir utilis fichier de configuration complexe où des conflits entre noms de variables peuvent survenir. -## Définition d'une macro VHost pour les configurations répétitives <Macro VHost $host $port $dir> Listen $port @@ -179,8 +172,7 @@ cr Use VHost www.apache.org 80 /vhosts/apache/htdocs Use VHost example.org 8080 /vhosts/example/htdocs -Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs -+Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs-<Macro DirGroup $dir $group> +@@ -228,15 +218,13 @@ UndefMacro DirGroup de même avec les noms de macros. -<Macro DirGroup $dir $group> <Directory $dir> Require group $group </Directory> @@ -202,8 +193,7 @@ variables peuvent survenir. Use DirGroup /www/apache/private private Use DirGroup /www/apache/server admin -UndefMacro DirGroup -+UndefMacro DirGroup-<Macro LocalAccessPolicy> +<Macro LocalAccessPolicy> Require ip 10.2.16.0/24 </Macro> <Macro RestrictedAccessPolicy $ipnumbers> Require ip $ipnumbers -</Macro> -+</Macro>-Use LocalAccessPolicy +Use LocalAccessPolicy ... -Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24" -+Use RestrictedAccessPolicy "192.54.172.0/24 192.54.148.0/24"est équivalent, avec les macros définies ci-dessus à :
--Require ip 10.2.16.0/24 +Require ip 10.2.16.0/24 ... -Require ip 192.54.172.0/24 192.54.148.0/24 -+Require ip 192.54.172.0/24 192.54.148.0/24bar.cgi.html, then instead of usingAddHandler cgi-script .cgi, use -@@ -268,12 +266,10 @@ charset overriding any mappings that already exist for the same extension. -Configure handler based on final extension only
-<FilesMatch \.cgi$> +Configure handler based on final extension only
<FilesMatch \.cgi$> SetHandler cgi-script -</FilesMatch> -+</FilesMatch>Example
-AddLanguage ja .ja +Example
AddLanguage ja .ja AddCharset EUC-JP .euc AddCharset ISO-2022-JP .jis -AddCharset SHIFT_JIS .sjis -+AddCharset SHIFT_JIS .sjisThen the document
-xxxx.ja.jiswill be treated @@ -317,10 +313,8 @@ type overriding any mappings that already exist for the same extension.Example
-AddEncoding x-gzip .gz -AddEncoding x-compress .Z -+Example
AddEncoding x-gzip .gz +AddEncoding x-compress .ZThis will cause filenames containing the
-.gzextension @@ -367,9 +361,7 @@ handler activate CGI scripts with the file extension.cgi, you might use:- AddHandler cgi-script .cgi -+AddHandler cgi-script .cgiOnce that has been put into your httpd.conf file, any file containing @@ -441,11 +433,9 @@ language This directive overrides any mappings that already exist for the same extension.
--Example
-AddEncoding x-compress .Z +Example
AddEncoding x-compress .Z AddLanguage en .en -AddLanguage fr .fr -+AddLanguage fr .frThen the document
-xxxx.en.Zwill be treated as @@ -461,11 +451,9 @@ AddLanguage fr .fr extension, the last one encountered is the one that is used. That is, for the case of:-AddLanguage en .en +AddLanguage en .en AddLanguage en-gb .en -AddLanguage en-us .en -+AddLanguage en-us .endocuments with the extension
-.enwould be treated as @@ -504,9 +492,7 @@ responses from the server.shtmlfiles for server-side includes and will then compress the output usingmod_deflate.- AddOutputFilter INCLUDES;DEFLATE shtml -+AddOutputFilter INCLUDES;DEFLATE shtmlIf more than one filter is specified, they must be separated @@ -524,8 +510,7 @@ responses from the server the
-AddOutputFilterdirective.-# Effective filter "DEFLATE" +# Effective filter "DEFLATE" AddOutputFilter DEFLATE shtml <Location /foo> # Effective filter "INCLUDES", replacing "DEFLATE" @@ -542,8 +527,7 @@ AddOutputFilter DEFLATE shtml <Location /bar/baz/buz> # No effective filter, replacing "BUFFER" RemoveOutputFilter shtml -</Location> -+</Location>See also
@@ -578,16 +562,12 @@ typeTypesConfigfile.Example
- AddType image/gif .gif -+Example
AddType image/gif .gifOr, to specify multiple file extensions in one directive:
-Example
- AddType image/jpeg jpeg jpg jpe -+Example
AddType image/jpeg jpeg jpg jpeThe extension argument is case-insensitive and can @@ -600,9 +580,7 @@ type can be achieved by qualifying a media-type with
-qs:Example
- AddType application/rss+xml;qs=0.8 .xml -+Example
AddType application/rss+xml;qs=0.8 .xmlThis is useful in situations, e.g. when a client @@ -649,9 +627,7 @@ assigned a language-tag by some other means. by
-AddLanguage, then no Content-Language header field will be generated.Example
- DefaultLanguage en -+Example
DefaultLanguage enSee also
@@ -678,9 +654,7 @@ components as part of the filenameThis directive is recommended when you have a virtual filesystem.
-Example
- ModMimeUsePathInfo On -+Example
ModMimeUsePathInfo OnIf you have a request for
-/index.php/foo.shtml@@ -744,9 +718,7 @@ a matching file with MultiViews and filters to participate in Multviews, but will exclude unknown files:- MultiviewsMatch Handlers Filters -+MultiviewsMatch Handlers Filters
MultiviewsMatchis not allowed in a @@ -780,9 +752,7 @@ extensionsThe extension argument is case-insensitive and can be specified with or without a leading dot.
-@@ -804,13 +774,11 @@ extensions any associations inherited from parent directories or the server config files. An example of its use might be: -Example
- RemoveCharset .html .shtml -+Example
RemoveCharset .html .shtml/foo/.htaccess:
-AddEncoding x-gzip .gz +/foo/.htaccess:
AddEncoding x-gzip .gz AddType text/plain .asc <Files *.gz.asc> RemoveEncoding .gz -</Files> -+</Files>This will cause
-foo.gzto be marked as being @@ -846,14 +814,10 @@ extensions associations inherited from parent directories or the server config files. An example of its use might be:/foo/.htaccess:
- AddHandler server-parsed .html -+-/foo/.htaccess:
AddHandler server-parsed .html/foo/bar/.htaccess:
- RemoveHandler .html -+/foo/bar/.htaccess:
RemoveHandler .htmlThis has the effect of returning
.htmlfiles in @@ -936,9 +900,7 @@ extensionsThe extension argument is case-insensitive and can be specified with or without a leading dot.
-Example
- RemoveOutputFilter shtml -+Example
RemoveOutputFilter shtmlSee also
@@ -965,9 +927,7 @@ extensions directories or the server config files. An example of its use might be: -@@ -284,10 +282,8 @@ later./foo/.htaccess:
- RemoveType .cgi -+/foo/.htaccess:
RemoveType .cgiThis will remove any special handling of
-.cgidiff --git a/docs/manual/mod/mod_mime_magic.html.en b/docs/manual/mod/mod_mime_magic.html.en index 9b6860fcc1..f27af8917e 100644 --- a/docs/manual/mod/mod_mime_magic.html.en +++ b/docs/manual/mod/mod_mime_magic.html.en @@ -264,9 +264,7 @@ using the specified magic file used, in which case the more specific setting overrides the main server's file.diff --git a/docs/manual/mod/mod_negotiation.html.en b/docs/manual/mod/mod_negotiation.html.en index 2b18797602..2c52933563 100644 --- a/docs/manual/mod/mod_negotiation.html.en +++ b/docs/manual/mod/mod_negotiation.html.en @@ -192,9 +192,7 @@ Negotiation and theExample
- MimeMagicFile conf/magic -+Example
MimeMagicFile conf/magic.varfile should be associated with thetype-maphandler with anAddHandlerdirective: -- AddHandler type-map .var -+AddHandler type-map .varA request for
-document.html.varin this directory will @@ -278,10 +276,8 @@ found (equally acceptable) then the first matching variant,en, will be served.-LanguagePriority en fr de -ForceLanguagePriority Prefer -+LanguagePriority en fr de +ForceLanguagePriority Prefer-
ForceLanguagePriority Fallbackuses @@ -292,10 +288,8 @@ ForceLanguagePriority Prefer language response, but such a variant isn't found, then the first variant from theLanguagePrioritylist below will be served.-LanguagePriority en fr de -ForceLanguagePriority Fallback -+LanguagePriority en fr de +ForceLanguagePriority FallbackBoth options,
-PreferandFallback, may be @@ -326,9 +320,7 @@ the client does not express a preference express a preference, when handling a Multiviews request. The list of MIME-lang are in order of decreasing preference.- LanguagePriority en fr de -+LanguagePriority en fr deFor a request for
-foo.html, where diff --git a/docs/manual/mod/mod_negotiation.html.fr b/docs/manual/mod/mod_negotiation.html.fr index d03a1275f5..6af194ef64 100644 --- a/docs/manual/mod/mod_negotiation.html.fr +++ b/docs/manual/mod/mod_negotiation.html.fr @@ -197,9 +197,7 @@ contenu et le fichier.vardoit être associé au gestionnairetype-mapvia une directiveAddHandler:- AddHandler type-map .var -+AddHandler type-map .varA l'arrivée d'une requête pour la ressource @@ -288,10 +286,8 @@ n'est pas trouv première variante acceptable de langue
-enqui sera servie.-LanguagePriority en fr de -ForceLanguagePriority Prefer -+LanguagePriority en fr de +ForceLanguagePriority Prefer-
ForceLanguagePriority Fallbackutilise la directive @@ -303,10 +299,8 @@ ForceLanguagePriority Prefer dans cette langue n'est trouvée, c'est la première variante de la liste définie par la directiveLanguagePriorityqui sera servie.-LanguagePriority en fr de -ForceLanguagePriority Fallback -+LanguagePriority en fr de +ForceLanguagePriority FallbackLes deux options,
-PreferetFallback, @@ -341,9 +335,7 @@ cas o langages-MIME dans un ordre de préférences décroissantes.- LanguagePriority en fr de -+LanguagePriority en fr deDans le cas d'une requête pour
foo.html, si diff --git a/docs/manual/mod/mod_policy.html.en b/docs/manual/mod/mod_policy.html.en index 11120bad77..597d2d459a 100644 --- a/docs/manual/mod/mod_policy.html.en +++ b/docs/manual/mod/mod_policy.html.en @@ -228,8 +228,7 @@A typical configuration protecting a server serving static content might be as follows:
--<Location /> +<Location /> SetOutputFilter POLICY_TYPE;POLICY_LENGTH;POLICY_KEEPALIVE;POLICY_VARY;POLICY_VALIDATION; \ POLICY_CONDITIONAL;POLICY_NOCACHE;POLICY_MAXAGE;POLICY_VERSION @@ -264,8 +263,7 @@ # suppress policy protection for server-status <Location /server-status> PolicyFilter off -</Location> -+</Location>When logged or enforced, a response that should have been conditional but wasn't will be rejected.
-@@ -325,10 +321,8 @@ later. variable is present and equal to the ignore-value, all policies will be ignored. -Example
-# non-functional conditional responses should be rejected -PolicyConditional enforce -+Example
# non-functional conditional responses should be rejected +PolicyConditional enforce@@ -346,8 +340,7 @@ later.Example
-# downgrade if POLICY_CONTROL was present -PolicyEnvironment POLICY_CONTROL log ignore -+Example
# downgrade if POLICY_CONTROL was present +PolicyEnvironment POLICY_CONTROL log ignoreMaster switch to enable or disable policies for a given URL space.
-@@ -376,10 +368,8 @@ later.Example
-# enabled by default +Example
# enabled by default <Location /> PolicyFilter on </Location> @@ -355,8 +348,7 @@ later. # suppress policy protection for server-status <Location /server-status> PolicyFilter off -</Location> -+</Location>Content-Lengthheader and aTransfer-Encodingofchunkedwill be rejected. -@@ -414,10 +404,8 @@ later.Example
-# missing Content-Length or Transfer-Encoding should be rejected -PolicyKeepalive enforce -+Example
# missing Content-Length or Transfer-Encoding should be rejected +PolicyKeepalive enforceWhen logged or enforced, a response that lacks an explicit
-Content-Lengthheader will be rejected.@@ -454,10 +442,8 @@ later.Example
-# missing Content-Length header should be rejected -PolicyLength enforce -+Example
# missing Content-Length header should be rejected +PolicyLength enforceExpiresheader, or where the explicit freshness lifetime is smaller than the given value, will be rejected. -Example
-# reject responses with a freshness lifetime shorter than a day -PolicyMaxage enforce 86400 -+@@ -494,10 +480,8 @@ later. using theExample
# reject responses with a freshness lifetime shorter than a day +PolicyMaxage enforce 86400Cache-ControlorPragmaheaders will be rejected. -Example
-# Cache-Control: no-cache will be rejected -PolicyNocache enforce -+@@ -534,16 +518,12 @@ later. header, where theExample
# Cache-Control: no-cache will be rejected +PolicyNocache enforceContent-Typeheader is malformed, or where the header does not match the given pattern or patterns will be rejected. -Example
-# enforce json or XML -PolicyType enforce application/json text/xml -+-Example
# enforce json or XML +PolicyType enforce application/json text/xmlExample
-# malformed content type should be rejected -PolicyType enforce */* -+@@ -580,10 +560,8 @@ later.Example
# malformed content type should be rejected +PolicyType enforce */*ETagheader or aLast-Modifiedheader, or where either header is syntactically incorrect, will be rejected. -Example
-# no ETag or Last-Modified will be rejected -PolicyValidation enforce -+@@ -620,10 +598,8 @@ later. header which in turn contains one of the headers listed, will be rejected. -Example
# no ETag or Last-Modified will be rejected +PolicyValidation enforceExample
-# reject reponses with "User-Agent" listed in the Vary header -PolicyVary enforce User-Agent -+@@ -659,10 +635,8 @@ later.Example
# reject reponses with "User-Agent" listed in the Vary header +PolicyVary enforce User-AgentWhen logged or enforced, a request with a version lower than specified will be rejected.
-Example
-# reject requests with an HTTP version older than HTTP/1.1 -PolicyVersion enforce HTTP/1.1 -+diff --git a/docs/manual/mod/mod_proxy.html.en b/docs/manual/mod/mod_proxy.html.en index 11dbd654d0..70651a6d5d 100644 --- a/docs/manual/mod/mod_proxy.html.en +++ b/docs/manual/mod/mod_proxy.html.en @@ -201,20 +201,16 @@Example
# reject requests with an HTTP version older than HTTP/1.1 +PolicyVersion enforce HTTP/1.1In addition, if you wish to have caching enabled, consult the documentation from
-mod_cache.Reverse Proxy
-ProxyPass /foo http://foo.example.com/bar -ProxyPassReverse /foo http://foo.example.com/bar -+-Reverse Proxy
ProxyPass /foo http://foo.example.com/bar +ProxyPassReverse /foo http://foo.example.com/barForward Proxy
-ProxyRequests On +Forward Proxy
ProxyRequests On ProxyVia On <Proxy *> Require host internal.example.com -</Proxy> -+</Proxy>@@ -237,9 +233,7 @@ ProxyVia On@@ -573,10 +555,8 @@ directly always served directly, without forwarding to the configuredProxyPassMatchwhen used for a reverse proxy: -- ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30 -+ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30This will create a worker associated with the origin server URL @@ -247,19 +241,15 @@ ProxyVia On values. When used in a forward proxy, workers are usually defined via the
-ProxySetdirective:- ProxySet http://backend.example.com connectiontimeout=5 timeout=30 -+ProxySet http://backend.example.com connectiontimeout=5 timeout=30or alternatively using
-ProxyandProxySet:-<Proxy http://backend.example.com> +<Proxy http://backend.example.com> ProxySet connectiontimeout=5 timeout=30 -</Proxy> -+</Proxy>Using explicitly configured workers in the forward mode is @@ -276,10 +266,8 @@ ProxyVia On
The URL identifying a direct worker is the URL of its origin server including any path components given:
--ProxyPass /examples http://backend.example.com/examples -ProxyPass /docs http://backend.example.com/docs -+ProxyPass /examples http://backend.example.com/examples +ProxyPass /docs http://backend.example.com/docsThis example defines two different workers, each using a separate @@ -290,10 +278,8 @@ ProxyPass /docs http://backend.example.com/docs the URL of some worker is a leading substring of the URL of another worker defined later in the configuration file. In the following example
--ProxyPass /apps http://backend.example.com/ timeout=60 -ProxyPass /examples http://backend.example.com/examples timeout=10 -+ProxyPass /apps http://backend.example.com/ timeout=60 +ProxyPass /examples http://backend.example.com/examples timeout=10the second worker isn't actually created. Instead the first @@ -340,11 +326,9 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
You can control who can access your proxy via the
-<Proxy>control block as in the following example:-<Proxy *> +<Proxy *> Require ip 192.168.0 -</Proxy> -+</Proxy>For more information on access control directives, see @@ -402,13 +386,11 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
These are the
-force-proxy-request-1.0andproxy-nokeepalivenotes.-<Location /buggyappserver/> +<Location /buggyappserver/> ProxyPass http://buggyappserver:7001/foo/ SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 -</Location> -+</Location>ProxyRemoteproxy server(s). -Example
-ProxyRemote * http://firewall.example.com:81 -NoProxy .example.com 192.168.112.0/21 -+Example
ProxyRemote * http://firewall.example.com:81 +NoProxy .example.com 192.168.112.0/21The host arguments to the
-NoProxy@@ -699,22 +679,18 @@ NoProxy .example.com 192.168.112.0/21yournetwork.example.comto access content via your proxy server:-<Proxy *> +<Proxy *> Require host yournetwork.example.com -</Proxy> -+</Proxy>The following example will process all files in the
-foodirectory ofexample.comthrough theINCLUDESfilter when they are sent through the proxy server:-<Proxy http://example.com/foo/*> +<Proxy http://example.com/foo/*> SetOutputFilter INCLUDES -</Proxy> -+</Proxy>Differences from the Location configuration section
@@ -823,9 +799,7 @@ responseNote that the DNS lookups may slow down the startup time of the server.
-Example
- ProxyBlock news.example.com auctions.example.com friends.example.com -+Example
ProxyBlock news.example.com auctions.example.com friends.example.comNote that
examplewould also be sufficient to match any @@ -835,9 +809,7 @@ responseNote also that
-- ProxyBlock * -+ProxyBlock *blocks connections to all sites.
@@ -859,11 +831,9 @@ response response to the same host with the configured Domain appended will be generated. -@@ -939,11 +909,9 @@ proxied resourcesExample
- ProxyRemote * http://firewall.example.com:81
+Example
ProxyRemote * http://firewall.example.com:81+ ProxyDomain .example.com
NoProxy .example.com 192.168.112.0/21
- ProxyDomain .example.com -mod_rewrite. In order to prevent confusion, numbered (unnamed) backreferences are ignored. Use named groups instead. --<ProxyMatch ^http://(?<sitename>[^/]+)> +<ProxyMatch ^http://(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</ProxyMatch> -+</ProxyMatch>See also
@@ -967,9 +935,7 @@ throughMax-Forwardsheader supplied with the request. This may be set to prevent infinite proxy loops, or a DoS attack. -Example
- ProxyMaxForwards 15 -+Example
ProxyMaxForwards 15Note that setting
ProxyMaxForwardsis a @@ -1024,11 +990,9 @@ throughSuppose the local server has address
-http://example.com/; then-<Location /mirror/foo/> +<Location /mirror/foo/> ProxyPass http://backend.example.com/ -</Location> -+</Location>will cause a local request for @@ -1040,9 +1004,7 @@ through the below syntax is that it allows for dynamic control via the Balancer Manager interface:
-- ProxyPass /mirror/foo/ http://backend.example.com/ -+ProxyPass /mirror/foo/ http://backend.example.com/@@ -1056,20 +1018,16 @@ throughThe
-!directive is useful in situations where you don't want to reverse-proxy a subdirectory, e.g.-<Location /mirror/foo/> +-<Location /mirror/foo/> ProxyPass http://backend.example.com/ </Location> <Location /mirror/foo/i> ProxyPass ! -</Location> -+</Location>-ProxyPass /mirror/foo/i ! -ProxyPass /mirror/foo http://backend.example.com -+ProxyPass /mirror/foo/i ! +ProxyPass /mirror/foo http://backend.example.comwill proxy all requests to
-/mirror/footo @@ -1116,9 +1074,7 @@ ProxyPass /mirror/foo http://backend.example.com among all child processes, except when only one child process is allowed by configuration or MPM design.@@ -1545,9 +1495,7 @@ ProxyPassReverse /mirror/foo/ https://backend.example.com/Example
- ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300 -+Example
ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300@@ -1397,30 +1353,26 @@ ProxyPass /mirror/foo http://backend.example.com
BalancerMember parameters A sample balancer setup
--ProxyPass /special-area http://special.example.com smax=5 max=10 +ProxyPass /special-area http://special.example.com smax=5 max=10 ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On <Proxy balancer://mycluster> BalancerMember ajp://1.2.3.4:8009 BalancerMember ajp://1.2.3.5:8009 loadfactor=20 # Less powerful server, don't send as many requests there, BalancerMember ajp://1.2.3.6:8009 loadfactor=5 -</Proxy> -+</Proxy>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 # The server below is on hot standby BalancerMember ajp://1.2.3.6:8009 status=+H ProxySet lbmethod=bytraffic -</Proxy> -+</Proxy>Normally, mod_proxy will canonicalise ProxyPassed URLs. @@ -1460,8 +1412,7 @@ ProxyPass / balancer://hotcluster/ scheme can be accomplished with
-mod_rewriteas in the following example.-RewriteEngine On +RewriteEngine On RewriteCond %{HTTPS} =off RewriteRule . - [E=protocol:http] @@ -1470,8 +1421,7 @@ RewriteRule . - [E=protocol:https] RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P] ProxyPassReverse /mirror/foo/ http://backend.example.com/ -ProxyPassReverse /mirror/foo/ https://backend.example.com/ -+ProxyPassReverse /mirror/foo/ https://backend.example.com/Suppose the local server has address
-http://example.com/; then- ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1 -+ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1will cause a local request for @@ -1557,16 +1505,12 @@ ProxyPassReverse /mirror/foo/ https://backend.example.com/
The URL argument must be parsable as a URL before regexp substitutions (as well as after). This limits the matches you can use. For instance, if we had used
-- ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1 -+ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1in our previous example, it would fail with a syntax error at server startup. This is a bug (PR 46665 in the ASF bugzilla), and the workaround is to reformulate the match:
-- ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1 -+ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1The
!directive is useful in situations where you don't want @@ -1622,12 +1566,10 @@ proxied serverFor example, suppose the local server has address
-http://example.com/; then-ProxyPass /mirror/foo/ http://backend.example.com/ +ProxyPass /mirror/foo/ http://backend.example.com/ ProxyPassReverse /mirror/foo/ http://backend.example.com/ ProxyPassReverseCookieDomain backend.example.com public.example.com -ProxyPassReverseCookiePath / /mirror/foo/ -+ProxyPassReverseCookiePath / /mirror/foo/will not only cause a local request for the @@ -1702,9 +1644,7 @@ reverse proxy. This directive rewrites the
-pathstring in In the example given withProxyPassReverse, the directive:- ProxyPassReverseCookiePath / /mirror/foo/ -+ProxyPassReverseCookiePath / /mirror/foo/will rewrite a cookie with backend path
-/(or @@ -1752,9 +1692,7 @@ connections to0to indicate that the system's default buffer size should be used.@@ -1783,11 +1721,9 @@ connections are supported by this module. When usingExample
- ProxyReceiveBufferSize 2048 -+Example
ProxyReceiveBufferSize 2048https, the requests are forwarded through the remote proxy using the HTTP CONNECT method. -Example
-ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000 +Example
ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000 ProxyRemote * http://cleverproxy.localdomain -ProxyRemote ftp http://ftpproxy.mydomain:8080 -+ProxyRemote ftp http://ftpproxy.mydomain:8080In the last example, the proxy will forward FTP requests, encapsulated @@ -1869,30 +1805,22 @@ expressions
-RewriteRuleinstead of aProxyPassdirective.-<Proxy balancer://hotcluster> +-<Proxy balancer://hotcluster> BalancerMember http://www2.example.com:8080 loadfactor=1 BalancerMember http://www3.example.com:8080 loadfactor=2 ProxySet lbmethod=bytraffic -</Proxy> -+</Proxy>-<Proxy http://backend> +-<Proxy http://backend> ProxySet keepalive=On -</Proxy> -+</Proxy>- ProxySet balancer://foo lbmethod=bytraffic timeout=15 -+ProxySet balancer://foo lbmethod=bytraffic timeout=15-- ProxySet ajp://backend:7001 timeout=15 -+ProxySet ajp://backend:7001 timeout=15Warning
diff --git a/docs/manual/mod/mod_proxy.html.fr b/docs/manual/mod/mod_proxy.html.fr index d4fce8d96d..47366a331f 100644 --- a/docs/manual/mod/mod_proxy.html.fr +++ b/docs/manual/mod/mod_proxy.html.fr @@ -219,20 +219,16 @@Si en outre, vous désirez activer la mise en cache, consultez la documentation de
-mod_cache.Mandataire inverse
-ProxyPass /foo http://foo.example.com/bar -ProxyPassReverse /foo http://foo.example.com/bar -+-Mandataire inverse
ProxyPass /foo http://foo.example.com/bar +ProxyPassReverse /foo http://foo.example.com/barMandataire direct
-ProxyRequests On +Mandataire direct
ProxyRequests On ProxyVia On <Proxy *> Require host internal.example.com -</Proxy> -+</Proxy>@@ -256,9 +252,7 @@ ProxyVia On Ils sont en général définis via les directivesProxyPassouProxyPassMatchlorsqu'on les utilise dans le cadre d'un mandataire inverse : -- ProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30 -+@@ -268,19 +262,15 @@ ProxyVia On d'un mandataire direct, les workers sont en général définis via la directiveProxyPass /example http://backend.example.com connectiontimeout=5 timeout=30ProxySet, -@@ -641,10 +623,8 @@ directement sans être redirigée vers le(s) serveur(s) mandataire(s) défini(s) par la directive- ProxySet http://backend.example.com connectiontimeout=5 timeout=30 -+ProxySet http://backend.example.com connectiontimeout=5 timeout=30ou encore via les directives
-ProxyetProxySet:-<Proxy http://backend.example.com> +<Proxy http://backend.example.com> ProxySet connectiontimeout=5 timeout=30 -</Proxy> -+</Proxy>L'utilisation de workers définis explicitement dans le mode @@ -299,10 +289,8 @@ ProxyVia On
L'URL qui identifie un worker correspond à l'URL de son serveur original, y compris un éventuel chemin donné :
--ProxyPass /examples http://backend.example.com/examples -ProxyPass /docs http://backend.example.com/docs -+ProxyPass /examples http://backend.example.com/examples +ProxyPass /docs http://backend.example.com/docsDans cet exemple, deux workers différents sont définis, chacun @@ -315,10 +303,8 @@ ProxyPass /docs http://backend.example.com/docs correspond au début de l'URL d'un autre worker défini plus loin dans le fichier de configuration. Dans l'exemple suivant,
--ProxyPass /apps http://backend.example.com/ timeout=60 -ProxyPass /examples http://backend.example.com/examples timeout=10 -+ProxyPass /apps http://backend.example.com/ timeout=60 +ProxyPass /examples http://backend.example.com/examples timeout=10le second worker n'est pas vraiment créé. C'est le premier @@ -372,11 +358,9 @@ ProxyPass /examples http://backend.example.com/examples timeout=10 de contrôle
-<Proxy>comme dans l'exemple suivant :-<Proxy *> +<Proxy *> Require ip 192.168.0 -</Proxy> -+</Proxy>Pour plus de détails sur les directives de contrôle d'accès, @@ -447,13 +431,11 @@ ProxyPass /examples http://backend.example.com/examples timeout=10
Il s'agit des variables
-force-proxy-request-1.0etproxy-nokeepalive.-<Location /buggyappserver/> +<Location /buggyappserver/> ProxyPass http://buggyappserver:7001/foo/ SetEnv force-proxy-request-1.0 1 SetEnv proxy-nokeepalive 1 -</Location> -+</Location>ProxyRemote. -Exemple
-ProxyRemote * http://firewall.example.com:81 -NoProxy .example.com 192.168.112.0/21 -+Exemple
ProxyRemote * http://firewall.example.com:81 +NoProxy .example.com 192.168.112.0/21Le type des arguments serveur de la directive @@ -784,11 +764,9 @@ mandat contenu via votre serveur mandataire que les hôtes appartenant à
-votre-reseau.example.com:-<Proxy *> +<Proxy *> Require host votre-reseau.example.com -</Proxy> -+</Proxy>Dans l'exemple suivant, tous les fichiers du répertoire @@ -796,11 +774,9 @@ mandat filtre
-INCLUDESlorsqu'ils seront envoyés par l'intermédiaire du serveur mandataire :-<Proxy http://example.com/foo/*> +<Proxy http://example.com/foo/*> SetOutputFilter INCLUDES -</Proxy> -+</Proxy>Différences avec la section de configuration Location
@@ -921,9 +897,7 @@ incorrectes d'une rNotez que les recherches DNS peuvent ralentir le processus de démarrage du serveur.
-Exemple
- ProxyBlock news.example.com auctions.example.com friends.example.com -+Exemple
ProxyBlock news.example.com auctions.example.com friends.example.comNotez qu'
examplesuffirait aussi pour atteindre @@ -933,9 +907,7 @@ incorrectes d'une rNotez aussi que
-- ProxyBlock * -+ProxyBlock *bloque les connexions vers tous les sites.
@@ -959,11 +931,9 @@ mandat générer une réponse de redirection vers le même hôte suffixé par le Domaine spécifié. -@@ -1049,11 +1019,9 @@ mandat nommées) sont ignorées. Vous devez utiliser à la place des groupes nommés. -Exemple
- ProxyRemote * http://firewall.example.com:81
+Exemple
ProxyRemote * http://firewall.example.com:81+ ProxyDomain .example.com
NoProxy .example.com 192.168.112.0/21
- ProxyDomain .example.com --<ProxyMatch ^http://(?<sitename>[^/]+)> +<ProxyMatch ^http://(?<sitename>[^/]+)> require ldap-group cn=%{env:MATCH_SITENAME},ou=combined,o=Example -</ProxyMatch> -+</ProxyMatch>Voir aussi
@@ -1079,9 +1047,7 @@ requ contre les boucles infinies de mandataires ou contre les attaques de type déni de service. -Exemple
- ProxyMaxForwards 15 -+Exemple
ProxyMaxForwards 15Notez que la définition de la directive @@ -1143,11 +1109,9 @@ l'espace d'URLs du serveur local
Supposons que le serveur local a pour adresse
-http://example.com/; alors la ligne-<Location /mirror/foo/> +<Location /mirror/foo/> ProxyPass http://backend.example.com/ -</Location> -+</Location>va convertir en interne toute requête pour @@ -1159,9 +1123,7 @@ l'espace d'URLs du serveur local présente en très grand nombre. Elle possède l'avantage de permettre un contrôle dynamique via l'interface Balancer Manager :
-- ProxyPass /miroir/foo/ http://backend.example.com/ -+ProxyPass /miroir/foo/ http://backend.example.com/@@ -1176,20 +1138,16 @@ l'espace d'URLs du serveur localLe drapeau
-!permet de soustraire un sous-répertoire du mandat inverse, comme dans l'exemple suivant :-<Location /mirror/foo/> +-<Location /mirror/foo/> ProxyPass http://backend.example.com/ </Location> <Location /mirror/foo/i> ProxyPass ! -</Location> -+</Location>-ProxyPass /mirror/foo/i ! -ProxyPass /mirror/foo http://backend.example.com -+ProxyPass /mirror/foo/i ! +ProxyPass /mirror/foo http://backend.example.comva mandater toutes les requêtes pour
-/miroir/foo@@ -1242,9 +1200,7 @@ ProxyPass /mirror/foo http://backend.example.com enfants, sauf si un seul processus enfant est autorisé par la configuration ou la conception du module multi-processus (MPM).@@ -1833,12 +1777,10 @@ par un serveur mandatExemple
- ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300 -+Exemple
ProxyPass /example http://backend.example.com max=20 ttl=120 retry=300@@ -1578,30 +1534,26 @@ ProxyPass /mirror/foo http://backend.example.com
Paramètres de BalancerMember Exemple de configuration d'un répartiteur de charge
--ProxyPass /special-area http://special.example.com smax=5 max=10 +ProxyPass /special-area http://special.example.com smax=5 max=10 ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On <Proxy balancer://mycluster> BalancerMember ajp://1.2.3.4:8009 BalancerMember ajp://1.2.3.5:8009 loadfactor=20 # Less powerful server, don't send as many requests there, BalancerMember ajp://1.2.3.6:8009 loadfactor=5 -</Proxy> -+</Proxy>Configuration d'un serveur cible de réserve qui ne sera utilisé que si aucun autre serveur cible n'est disponible
--ProxyPass / balancer://hotcluster/ +ProxyPass / balancer://hotcluster/ <Proxy balancer://hotcluster> BalancerMember ajp://1.2.3.4:8009 loadfactor=1 BalancerMember ajp://1.2.3.5:8009 loadfactor=2 # The server below is on hot standby BalancerMember ajp://1.2.3.6:8009 status=+H ProxySet lbmethod=bytraffic -</Proxy> -+</Proxy>Normalement, mod_proxy va mettre sous leur forme canonique les @@ -1649,8 +1601,7 @@ ProxyPass / balancer://hotcluster/ protocole peut être effectuée à l'aide de
-mod_rewritecomme dans l'exemple suivant :-RewriteEngine On +@@ -1746,9 +1696,7 @@ du serveur local en utilisant des expressions rationnellesRewriteEngine On RewriteCond %{HTTPS} =off RewriteRule . - [E=protocol:http] @@ -1659,8 +1610,7 @@ RewriteRule . - [E=protocol:https] RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P] ProxyPassReverse /mirror/foo/ http://backend.example.com/ -ProxyPassReverse /mirror/foo/ https://backend.example.com/ -+ProxyPassReverse /mirror/foo/ https://backend.example.com/Supposons que le serveur local a pour adresse
-http://example.com/; alors- ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1 -+ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com$1va provoquer la conversion interne de la requête locale @@ -1760,17 +1708,13 @@ du serveur local en utilisant des expressions rationnelles avant les substitutions d'expressions rationnelles (et doit aussi l'être après). Ceci limite les correspondances que vous pouvez utiliser. Par exemple, si l'on avait utilisé
-- ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1 -+ProxyPassMatch ^(/.*\.gif)$ http://backend.example.com:8000$1dans l'exemple précédent, nous aurions provoqué une erreur de syntaxe au démarrage du serveur. C'est une bogue (PR 46665 dans ASF bugzilla), et il est possible de la contourner en reformulant la correspondance :
-- ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1 -+ProxyPassMatch ^/(.*\.gif)$ http://backend.example.com:8000/$1Supposons par exemple que le serveur local a pour adresse
-http://example.com/; alors-ProxyPass /mirror/foo/ http://backend.example.com/ +ProxyPass /mirror/foo/ http://backend.example.com/ ProxyPassReverse /mirror/foo/ http://backend.example.com/ ProxyPassReverseCookieDomain backend.example.com public.example.com -ProxyPassReverseCookiePath / /mirror/foo/ -+ProxyPassReverseCookiePath / /mirror/foo/ne va pas seulement provoquer la conversion interne d'une requête @@ -1924,9 +1866,7 @@ r
Dans l'exemple fourni avec la directive
-ProxyPassReverse, la directive :- ProxyPassReverseCookiePath / /mirror/foo/ -+ProxyPassReverseCookiePath / /mirror/foo/va réécrire un cookie possédant un chemin d'arrière-plan
-/@@ -1977,9 +1917,7 @@ et FTP0pour indiquer que la taille de tampon par défaut du système doit être utilisée.@@ -2012,11 +1950,9 @@ requExemple
- ProxyReceiveBufferSize 2048 -+Exemple
ProxyReceiveBufferSize 2048https, les requêtes sont redirigées par le mandataire distant en utilisant la méthode HTTP CONNECT. -Exemple
-ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000 +Exemple
ProxyRemote http://goodguys.example.com/ http://mirrorguys.example.com:8000 ProxyRemote * http://cleverproxy.localdomain -ProxyRemote ftp http://ftpproxy.mydomain:8080 -+ProxyRemote ftp http://ftpproxy.mydomain:8080Dans la dernière ligne de l'exemple, le mandataire va faire @@ -2108,30 +2044,22 @@ charge est créé. Ceci peut s'avérer utile pour la mise en oeuvre d'un mandataire inverse via une directive
-RewriteRuleau lieu deProxyPass.-<Proxy balancer://hotcluster> +-<Proxy balancer://hotcluster> BalancerMember http://www2.example.com:8080 loadfactor=1 BalancerMember http://www3.example.com:8080 loadfactor=2 ProxySet lbmethod=bytraffic -</Proxy> -+</Proxy>-<Proxy http://backend> +-<Proxy http://backend> ProxySet keepalive=On -</Proxy> -+</Proxy>- ProxySet balancer://foo lbmethod=bytraffic timeout=15 -+ProxySet balancer://foo lbmethod=bytraffic timeout=15-- ProxySet ajp://backend:7001 timeout=15 -+ProxySet ajp://backend:7001 timeout=15Avertissement
diff --git a/docs/manual/mod/mod_proxy_ajp.html.en b/docs/manual/mod/mod_proxy_ajp.html.en index 6fb79e85fe..b4697f5c30 100644 --- a/docs/manual/mod/mod_proxy_ajp.html.en +++ b/docs/manual/mod/mod_proxy_ajp.html.en @@ -71,20 +71,16 @@ (e.g. Apache Tomcat) using the AJP13 protocol. The usage is similar to an HTTP reverse proxy, but uses theajp://prefix: -Simple Reverse Proxy
- ProxyPass /app ajp://backend.example.com:8009/app -+Simple Reverse Proxy
ProxyPass /app ajp://backend.example.com:8009/appBalancers may also be used:
-Balancer Reverse Proxy
-<Proxy balancer://cluster> +Balancer Reverse Proxy
<Proxy balancer://cluster> BalancerMember ajp://app1.example.com:8009 loadfactor=1 BalancerMember ajp://app2.example.com:8009 loadfactor=2 ProxySet lbmethod=bytraffic </Proxy> -ProxyPass /app balancer://cluster/app -+ProxyPass /app balancer://cluster/appNote that usually no @@ -99,10 +95,8 @@ ProxyPass /app balancer://cluster/app backend. In this case, a redirect header can be rewritten relative to the original host URL (not the backend
-ajp://URL), for example:Rewriting Proxied Path
-ProxyPass /apps/foo ajp://backend.example.com:8009/foo -ProxyPassReverse /apps/foo http://www.example.com/foo -+Rewriting Proxied Path
ProxyPass /apps/foo ajp://backend.example.com:8009/foo +ProxyPassReverse /apps/foo http://www.example.com/fooHowever, it is usually better to deploy the application on the backend server at the same path as the proxy rather than to take this approach. @@ -341,8 +335,7 @@ ProxyPassReverse /apps/foo http://www.example.com/foo
Request Packet Structure
For messages from the server to the container of type Forward Request:
--AJP13_FORWARD_REQUEST := ++ request_terminator (byte) OxFFAJP13_FORWARD_REQUEST := prefix_code (byte) 0x02 = JK_AJP13_FORWARD_REQUEST method (byte) protocol (string) @@ -355,25 +348,19 @@ AJP13_FORWARD_REQUEST := num_headers (integer) request_headers *(req_header_name req_header_value) attributes *(attribut_name attribute_value) - request_terminator (byte) OxFF -The
request_headershave the following structure: --req_header_name := ++req_header_value := (string)req_header_name := sc_req_header_name | (string) [see below for how this is parsed] sc_req_header_name := 0xA0xx (integer) -req_header_value := (string) -The
-attributesare optional and have the following structure:-attribute_name := sc_a_name | (sc_a_req_attribute string) ++attribute_value := (string)attribute_name := sc_a_name | (sc_a_req_attribute string) -attribute_value := (string) - -Not that the all-important header is
@@ -526,8 +513,7 @@ attribute_value := (string)content-length, because it determines whether or not the container looks for another packet immediately.Response Packet Structure
for messages which the container can send back to the server.
--AJP13_SEND_BODY_CHUNK := ++ requested_length (integer)AJP13_SEND_BODY_CHUNK := prefix_code 3 chunk_length (integer) chunk *(byte) @@ -555,8 +541,7 @@ AJP13_END_RESPONSE := AJP13_GET_BODY_CHUNK := prefix_code 6 - requested_length (integer) -Details:
Send Body Chunk
The chunk is basically binary data, and is sent directly back to the diff --git a/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 b/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 index e4a6cda995..4cdade51af 100644 --- a/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 +++ b/docs/manual/mod/mod_proxy_ajp.html.ja.utf8 @@ -284,8 +284,7 @@
リクエストパケット構é€
サーãƒã‹ã‚‰ã‚³ãƒ³ãƒ†ãƒŠã¸é€ã‚‰ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒ Forward Request åž‹ã®å ´åˆ :
--AJP13_FORWARD_REQUEST := ++ request_terminator (byte) OxFFAJP13_FORWARD_REQUEST := prefix_code (byte) 0x02 = JK_AJP13_FORWARD_REQUEST method (byte) protocol (string) @@ -298,24 +297,18 @@ AJP13_FORWARD_REQUEST := num_headers (integer) request_headers *(req_header_name req_header_value) attributes *(attribut_name attribute_value) - request_terminator (byte) OxFF -
request_headersã¯æ¬¡ã®ã‚ˆã†ãªæ§‹é€ ã«ãªã£ã¦ã„ã¾ã™ : --req_header_name := ++req_header_value := (string)req_header_name := sc_req_header_name | (string) [see below for how this is parsed] sc_req_header_name := 0xA0xx (integer) -req_header_value := (string) --
属性ã¯ã‚ªãƒ—ションã§ã€æ¬¡ã®ã‚ˆã†ãªæ§‹é€ ã‚’ã—ã¦ã„ã¾ã™ :-attribute_name := sc_a_name | (sc_a_req_attribute string) ++attribute_value := (string)attribute_name := sc_a_name | (sc_a_req_attribute string) -attribute_value := (string) - -ã‚‚ã£ã¨ã‚‚é‡è¦ãªãƒ˜ãƒƒãƒ€ã¯
@@ -463,8 +456,7 @@ attribute_value := (string)content-lengthã ã¨ã„ã†ã“ã¨ã« 注æ„ã—ã¦ãã ã•ã„ã€‚ã‚³ãƒ³ãƒ†ãƒŠã¯æ¬¡ã®ãƒ‘ケットを探ã™ã‹ã©ã†ã‹ã‚’〠ãã‚Œã‚’è¦‹ã¦æ±ºã‚ã‚‹ã‹ã‚‰ã§ã™ã€‚レスãƒãƒ³ã‚¹ãƒ‘ケット構é€
コンテナãŒã‚µãƒ¼ãƒã«é€ã‚Šè¿”ã™ã“ã¨ã®ã§ãるメッセージ:
--AJP13_SEND_BODY_CHUNK := ++ requested_length (integer)AJP13_SEND_BODY_CHUNK := prefix_code 3 chunk_length (integer) chunk *(byte) @@ -491,8 +483,7 @@ AJP13_END_RESPONSE := AJP13_GET_BODY_CHUNK := prefix_code 6 - requested_length (integer) -詳細 :
Send Body Chunk
ãƒãƒ£ãƒ³ã‚¯ã¯åŸºæœ¬çš„ã«ã¯ãƒã‚¤ãƒŠãƒªãƒ‡ãƒ¼ã‚¿ã§ã€ãƒ–ラウザã«ç›´æŽ¥é€ã‚‰ã‚Œã¾ã™ã€‚
diff --git a/docs/manual/mod/mod_proxy_balancer.html.en b/docs/manual/mod/mod_proxy_balancer.html.en index 9b1e6d9f6c..c5ec15f8e7 100644 --- a/docs/manual/mod/mod_proxy_balancer.html.en +++ b/docs/manual/mod/mod_proxy_balancer.html.en @@ -108,14 +108,12 @@ load balancing between two back-end servers: --<Proxy balancer://mycluster> +<Proxy balancer://mycluster> BalancerMember http://192.168.1.50:80 BalancerMember http://192.168.1.51:80 </Proxy> ProxyPass /test balancer://mycluster -ProxyPassReverse /test balancer://mycluster -+ProxyPassReverse /test balancer://myclusterAnother example of how to provide load balancing with stickyness @@ -123,16 +121,14 @@ ProxyPassReverse /test balancer://mycluster not set a suitable session cookie:
--Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED +Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED <Proxy balancer://mycluster> BalancerMember http://192.168.1.50:80 route=1 BalancerMember http://192.168.1.51:80 route=2 ProxySet stickysession=ROUTEID </Proxy> ProxyPass /test balancer://mycluster -ProxyPassReverse /test balancer://mycluster -+ProxyPassReverse /test balancer://mycluster@@ -206,12 +202,10 @@ ProxyPassReverse /test balancer://myclusterTo enable load balancer management for browsers from the example.com domain add this code to your
-httpd.confconfiguration file-<Location /balancer-manager> +<Location /balancer-manager> SetHandler balancer-manager Require host example.com -</Location> -+</Location>You can now access load balancer manager by using a Web browser @@ -268,13 +262,11 @@ ProxyPassReverse /test balancer://mycluster
Finally you can support cookies and URL encoding at the same time, by configuring the name of the cookie and the name of the URL parameter separated by a vertical bar (
-|) as in the following example:-ProxyPass /test balancer://mycluster stickysession=JSESSIONID|jsessionid scolonpathdelim=On +ProxyPass /test balancer://mycluster stickysession=JSESSIONID|jsessionid scolonpathdelim=On <Proxy balancer://mycluster> BalancerMember http://192.168.1.50:80 route=node1 BalancerMember http://192.168.1.51:80 route=node2 -</Proxy> -+</Proxy>If the cookie and the request parameter both provide routing information for the same request, the information from the request parameter is used.
diff --git a/docs/manual/mod/mod_proxy_fcgi.html.en b/docs/manual/mod/mod_proxy_fcgi.html.en index ee91f13ba6..56d9ab352b 100644 --- a/docs/manual/mod/mod_proxy_fcgi.html.en +++ b/docs/manual/mod/mod_proxy_fcgi.html.en @@ -73,9 +73,7 @@Remember, in order to make the following examples work, you have to enable
-mod_proxyandmod_proxy_fcgi.Single application instance
- ProxyPass /myapp/ fcgi://localhost:4000/ -+Single application instance
ProxyPass /myapp/ fcgi://localhost:4000/This application should be able to handle multiple concurrent @@ -89,9 +87,7 @@ reuse on the
-ProxyPassdirective, as shown in the following example:Single application instance, no connection reuse
- ProxyPass /myapp/ fcgi://localhost:4000/ disablereuse=on -+Single application instance, no connection reuse
ProxyPass /myapp/ fcgi://localhost:4000/ disablereuse=onThe balanced gateway needs
-mod_proxy_balancerand @@ -100,13 +96,11 @@ modules listed above.mod_lbmethod_byrequestsis the default, and will be used for this example configuration.Balanced gateway to multiple application instances
-ProxyPass /myapp/ balancer://myappcluster/ +Balanced gateway to multiple application instances
ProxyPass /myapp/ balancer://myappcluster/ <Proxy balancer://myappcluster/> BalancerMember fcgi://localhost:4000 BalancerMember fcgi://localhost:4001 -</Proxy> -+</Proxy>diff --git a/docs/manual/mod/mod_proxy_scgi.html.en b/docs/manual/mod/mod_proxy_scgi.html.en index 9154046e0a..3dca9631bc 100644 --- a/docs/manual/mod/mod_proxy_scgi.html.en +++ b/docs/manual/mod/mod_proxy_scgi.html.en @@ -66,9 +66,7 @@Remember, in order to make the following examples work, you have to enable
-mod_proxyandmod_proxy_scgi.Simple gateway
- ProxyPass /scgi-bin/ scgi://localhost:4000/ -+Simple gateway
ProxyPass /scgi-bin/ scgi://localhost:4000/The balanced gateway needs
-mod_proxy_balancerand @@ -77,13 +75,11 @@ modules listed above.mod_lbmethod_byrequestsis the default, and will be used for this example configuration.Balanced gateway
-ProxyPass /scgi-bin/ balancer://somecluster/ +Balanced gateway
ProxyPass /scgi-bin/ balancer://somecluster/ <Proxy balancer://somecluster> BalancerMember scgi://localhost:4000 BalancerMember scgi://localhost:4001 -</Proxy> -+</Proxy>@@ -125,9 +121,7 @@ backendmod_cgiin this regard, except that you can turn off the feature. -@@ -164,13 +158,11 @@ header the argument is applied as header name. -Example
- ProxySCGIInternalRedirect Off -+Example
ProxySCGIInternalRedirect Offdiff --git a/docs/manual/mod/mod_proxy_wstunnel.html.en b/docs/manual/mod/mod_proxy_wstunnel.html.en index fb9c6decfa..745da8ef7f 100644 --- a/docs/manual/mod/mod_proxy_wstunnel.html.en +++ b/docs/manual/mod/mod_proxy_wstunnel.html.en @@ -38,17 +38,13 @@ socket connections to a backend websockets server. The connection is automagically upgraded to a websocket connection: -Example
- # Use the default header (X-Sendfile) +Example
# Use the default header (X-Sendfile) ProxySCGISendfile On # Use a different header - ProxySCGISendfile X-Send-Static -+ ProxySCGISendfile X-Send-Static-Upgrade: WebSocket -Connection: Upgrade -+Upgrade: WebSocket +Connection: Upgrade-diff --git a/docs/manual/mod/mod_ratelimit.html.en b/docs/manual/mod/mod_ratelimit.html.en index 92b2b3dfcb..3373cdd39a 100644 --- a/docs/manual/mod/mod_ratelimit.html.en +++ b/docs/manual/mod/mod_ratelimit.html.en @@ -37,12 +37,10 @@ The connection speed to be simulated is specified, in KiB/s, using the environment variableProxying requests to websockets server
-ProxyPass /ws2/ ws://echo.websocket.org/ -ProxyPass /wss2/ wss://echo.websocket.org/ -+Proxying requests to websockets server
ProxyPass /ws2/ ws://echo.websocket.org/ +ProxyPass /wss2/ wss://echo.websocket.org/rate-limit. -diff --git a/docs/manual/mod/mod_reflector.html.en b/docs/manual/mod/mod_reflector.html.en index 10455d6303..0934c49a18 100644 --- a/docs/manual/mod/mod_reflector.html.en +++ b/docs/manual/mod/mod_reflector.html.en @@ -55,24 +55,20 @@Example Configuration
-<Location /downloads> +Example Configuration
<Location /downloads> SetOutputFilter RATE_LIMIT SetEnv rate-limit 400 -</Location> -+</Location>Pass the request body through the DEFLATE filter to compress the body. This request requires a Content-Encoding request header containing "gzip" for the filter to return compressed data. - -<Location /compress> +<Location /compress> SetHandler reflector SetOutputFilter DEFLATE -</Location> -+</Location>Image downsampling service Pass the request body through an image downsampling filter, and reflect the results to the caller. - diff --git a/docs/manual/mod/mod_remoteip.html.en b/docs/manual/mod/mod_remoteip.html.en index 578f57c3c3..659daa314f 100644 --- a/docs/manual/mod/mod_remoteip.html.en +++ b/docs/manual/mod/mod_remoteip.html.en @@ -136,14 +136,10 @@ via the request headers. other directives are used,-<Location /downsample> +<Location /downsample> SetHandler reflector SetOutputFilter DOWNSAMPLE -</Location> -+</Location>mod_remoteipwill trust all hosts presenting aRemoteIPHeaderIP value. -@@ -309,10 +295,8 @@ confiance pour prInternal (Load Balancer) Example
- RemoteIPHeader X-Client-IP -+-Internal (Load Balancer) Example
RemoteIPHeader X-Client-IP@@ -163,11 +159,9 @@ via the request headers. presented in this header, including private intranet addresses, are trusted when passed from these proxies. -Proxy Example
- RemoteIPHeader X-Forwarded-For -+Proxy Example
RemoteIPHeader X-Forwarded-For@@ -188,17 +182,13 @@ RemoteIPInternalProxy gateway.localdomain each whitespace or newline separated entry is processed identically to theInternal (Load Balancer) Example
-RemoteIPHeader X-Client-IP +Internal (Load Balancer) Example
RemoteIPHeader X-Client-IP RemoteIPInternalProxy 10.0.2.0/24 -RemoteIPInternalProxy gateway.localdomain -+RemoteIPInternalProxy gateway.localdomainRemoteIPInternalProxydirective. -@@ -218,10 +208,8 @@ gateway.localdomain #The front end balancer this header, while any intermediateInternal (Load Balancer) Example
-RemoteIPHeader X-Client-IP -RemoteIPInternalProxyList conf/trusted-proxies.lst -+-Internal (Load Balancer) Example
RemoteIPHeader X-Client-IP +RemoteIPInternalProxyList conf/trusted-proxies.lstconf/trusted-proxies.lst contents
-# Our internally trusted proxies; ++gateway.localdomain #The front end balancerconf/trusted-proxies.lst contents
# Our internally trusted proxies; 10.0.2.0/24 #Everyone in the testing group -gateway.localdomain #The front end balancer -RemoteIPInternalProxyaddresses are discarded. -@@ -243,11 +231,9 @@ RemoteIPProxiesHeader X-Forwarded-By 2000::/3 block) are not trusted as the useragent IP, and are left in theExample
-RemoteIPHeader X-Forwarded-For -RemoteIPProxiesHeader X-Forwarded-By -+Example
RemoteIPHeader X-Forwarded-For +RemoteIPProxiesHeader X-Forwarded-ByRemoteIPHeaderheader's value. -@@ -268,10 +254,8 @@ RemoteIPTrustedProxy proxy.example.com each whitespace or newline separated entry is processed identically to theTrusted (Load Balancer) Example
-RemoteIPHeader X-Forwarded-For +Trusted (Load Balancer) Example
RemoteIPHeader X-Forwarded-For RemoteIPTrustedProxy 10.0.2.16/28 -RemoteIPTrustedProxy proxy.example.com -+RemoteIPTrustedProxy proxy.example.comRemoteIPTrustedProxydirective. -@@ -247,10 +237,8 @@ adresses IP interm cet en-tête, alors que toute adresse intermédiaireTrusted (Load Balancer) Example
-RemoteIPHeader X-Forwarded-For -RemoteIPTrustedProxyList conf/trusted-proxies.lst -+Trusted (Load Balancer) Example
RemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxyList conf/trusted-proxies.lst@@ -215,17 +209,13 @@ confiance pour prconf/trusted-proxies.lst contents
diff --git a/docs/manual/mod/mod_remoteip.html.fr b/docs/manual/mod/mod_remoteip.html.fr index e2dc173444..e00e09d712 100644 --- a/docs/manual/mod/mod_remoteip.html.fr +++ b/docs/manual/mod/mod_remoteip.html.fr @@ -151,14 +151,10 @@ du clientRemoteIPHeadercomme hôte de confiance.-Exemple à usage interne (répartiteur de - charge)
- RemoteIPHeader X-Client-IP -+ charge)RemoteIPHeader X-Client-IP@@ -183,11 +179,9 @@ confiance pour pr sont indiquées par ces mandataires.Exemple dans le cas d'un mandataire
- RemoteIPHeader X-Forwarded-For -+Exemple dans le cas d'un mandataire
RemoteIPHeader X-Forwarded-ForExemple à usage interne (répartiteur de - charge)
-RemoteIPHeader X-Client-IP + charge)RemoteIPHeader X-Client-IP RemoteIPInternalProxy 10.0.2.0/24 -RemoteIPInternalProxy gateway.localdomain -+RemoteIPInternalProxy gateway.localdomainRemoteIPInternalProxy.-Exemple à usage interne (répartiteur de - charge)
-RemoteIPHeader X-Client-IP -RemoteIPInternalProxyList conf/trusted-proxies.lst -+ charge)RemoteIPHeader X-Client-IP +RemoteIPInternalProxyList conf/trusted-proxies.lstcontenu de conf/mandataires-de-confiance.lst
- # Nos mandataires internes de confiance ++ passerelle.domaine-local # Le frontal répartiteur de chargecontenu de conf/mandataires-de-confiance.lst
# Nos mandataires internes de confiance 10.0.2.0/24 # Tout le monde dans le groupe de test - passerelle.domaine-local # Le frontal répartiteur de charge -RemoteIPInternalProxyest omise. -@@ -278,11 +266,9 @@ confiance pour prExemple
-RemoteIPHeader X-Forwarded-For -RemoteIPProxiesHeader X-Forwarded-By -+Exemple
RemoteIPHeader X-Forwarded-For +RemoteIPProxiesHeader X-Forwarded-ByRemoteIPHeader.Exemple d'adresse de confiance (répartiteur de - charge
-RemoteIPHeader X-Forwarded-For + chargeRemoteIPHeader X-Forwarded-For RemoteIPTrustedProxy 10.0.2.16/28 -RemoteIPTrustedProxy proxy.example.com -+RemoteIPTrustedProxy proxy.example.comRemoteIPTrustedProxy.Exemple d'adresse de confiance (répartiteur de - charge
-RemoteIPHeader X-Forwarded-For -RemoteIPTrustedProxyList conf/trusted-proxies.lst -+ chargeRemoteIPHeader X-Forwarded-For +RemoteIPTrustedProxyList conf/trusted-proxies.lst-conf/mandataires-de-confiance.lst contents
diff --git a/docs/manual/mod/mod_reqtimeout.html.en b/docs/manual/mod/mod_reqtimeout.html.en index af1466aff9..53437a6a0d 100644 --- a/docs/manual/mod/mod_reqtimeout.html.en +++ b/docs/manual/mod/mod_reqtimeout.html.en @@ -49,9 +49,7 @@ Allow 10 seconds to receive the request including the headers and 30 seconds for receiving the request body: -- RequestReadTimeout header=10 body=30 -+RequestReadTimeout header=10 body=30@@ -62,9 +60,7 @@ the limit given indirectly byLimitRequestBody): -- RequestReadTimeout body=10,MinRate=1000 -+RequestReadTimeout body=10,MinRate=1000@@ -74,9 +70,7 @@ 500 bytes received. But do not allow more than 30 seconds for the request including the headers: -- RequestReadTimeout header=10-30,MinRate=500 -+RequestReadTimeout header=10-30,MinRate=500@@ -85,9 +79,7 @@ If a common configuration is used for http and https virtual hosts, the timeouts should not be set too low: -- RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 -+RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en index f313ee2418..644798809e 100644 --- a/docs/manual/mod/mod_rewrite.html.en +++ b/docs/manual/mod/mod_rewrite.html.en @@ -84,9 +84,7 @@ URLs on the fly level higher thantrace2only for debugging!-Example
- LogLevel alert rewrite:trace3 -+Example
LogLevel alert rewrite:trace3@@ -642,10 +638,8 @@ Alias /myapp /opt/myapp-1.2.3 to block unwanted hotlinking. -RewriteLog
@@ -139,15 +137,13 @@ URLs on the fly since the resource was not relative to the document root. This misconfiguration would normally cause the server to look for an "opt" directory under the document root. --DocumentRoot /var/www/example.com +DocumentRoot /var/www/example.com Alias /myapp /opt/myapp-1.2.3 <Directory /opt/myapp-1.2.3> RewriteEngine On RewriteBase /myapp/ RewriteRule ^index\.html$ welcome.html -</Directory> -+</Directory>- RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"+
- RewriteRule ^/images - [F] -RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"@@ -672,12 +666,10 @@ Alias /myapp /opt/myapp-1.2.3 Use this to combine rule conditions with a local OR instead of the implicit AND. Typical example: -
+ RewriteRule ^/images - [F]-RewriteCond %{REMOTE_HOST} ^host1 [OR] +Without this flag you would have to write the condition/rule @@ -703,12 +695,10 @@ RewriteRule ...some special stuff for any of these hosts... ``RewriteCond %{REMOTE_HOST} ^host1 [OR] RewriteCond %{REMOTE_HOST} ^host2 [OR] RewriteCond %{REMOTE_HOST} ^host3 -RewriteRule ...some special stuff for any of these hosts... -+RewriteRule ...some special stuff for any of these hosts...User-Agent:'' header of the request, you can use the following: --RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|Android) +RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|Android) RewriteRule ^/$ /homepage.mobile.html [L] -RewriteRule ^/$ /homepage.std.html [L] -+RewriteRule ^/$ /homepage.std.html [L]Explanation: If you use a browser which identifies itself @@ -792,17 +782,13 @@ RewriteRule ^/$ /homepage.std.html [L]
For example, you might define a
-RewriteMapas:- RewriteMap examplemap txt:/path/to/file/map.txt -+RewriteMap examplemap txt:/path/to/file/map.txtYou would then be able to use this map in a
-RewriteRuleas follows:- RewriteRule ^/ex/(.*) ${examplemap:$1} -+RewriteRule ^/ex/(.*) ${examplemap:$1}The following combinations for MapType and diff --git a/docs/manual/mod/mod_rewrite.html.fr b/docs/manual/mod/mod_rewrite.html.fr index 5a38f9cc21..cf333acba2 100644 --- a/docs/manual/mod/mod_rewrite.html.fr +++ b/docs/manual/mod/mod_rewrite.html.fr @@ -93,9 +93,7 @@ r supérieur à
trace2qu'à des fins de débogage !Exemple
- LogLevel alert rewrite:trace3 -+Exemple
LogLevel alert rewrite:trace3@@ -686,10 +682,8 @@ la r non désiré. -RewriteLog
@@ -155,15 +153,13 @@ ressource n' de configuration aurait conduit le serveur à rechercher un répertoire "opt" à la racine des documents. --DocumentRoot /var/www/example.com +DocumentRoot /var/www/example.com Alias /myapp /opt/myapp-1.2.3 <Directory /opt/myapp-1.2.3> RewriteEngine On RewriteBase /myapp/ RewriteRule ^index\.html$ welcome.html -</Directory> -+</Directory>- RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"+
- RewriteRule ^/images - [F] -RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'"@@ -718,12 +712,10 @@ la r Permet de chaîner les conditions de règles avec un OU au lieu du AND implicite. Exemple typique : -
+ RewriteRule ^/images - [F]-RewriteCond %{REMOTE_HOST} ^host1 [OR] +Sans ce drapeau, les paires @@ -750,12 +742,10 @@ RewriteRule ...r l'en-tête ``RewriteCond %{REMOTE_HOST} ^host1 [OR] RewriteCond %{REMOTE_HOST} ^host2 [OR] RewriteCond %{REMOTE_HOST} ^host3 -RewriteRule ...règles concernant tous ces hôtes... -+RewriteRule ...règles concernant tous ces hôtes...User-Agent:'' de la requête, vous pouvez utiliser ce qui suit : --RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|Android) +RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|Android) RewriteRule ^/$ /homepage.mobile.html [L] -RewriteRule ^/$ /homepage.std.html [L] -+RewriteRule ^/$ /homepage.std.html [L]Explications : si vous utilisez un navigateur @@ -855,17 +845,13 @@ correspondance:source de la correspondance
Par exemple, vous pouvez définir une directive
-RewriteMapcomme suit- RewriteMap map-exemple txt:/chemin/vers/fichier/map.txt -+RewriteMap map-exemple txt:/chemin/vers/fichier/map.txtVous pourrez ensuite utiliser cette table dans une directive
-RewriteRulecomme suit :- RewriteRule ^/ex/(.*) ${map-exemple:$1} -+RewriteRule ^/ex/(.*) ${map-exemple:$1}Les combinaisons suivantes pour type de correspondance diff --git a/docs/manual/mod/mod_sed.html.en b/docs/manual/mod/mod_sed.html.en index 07a4b64f90..a99711c516 100644 --- a/docs/manual/mod/mod_sed.html.en +++ b/docs/manual/mod/mod_sed.html.en @@ -75,28 +75,24 @@ the author's blog.
Sample Configuration
-Adding an output filter
-# In the following example, the sed filter will change the string +-Adding an output filter
# In the following example, the sed filter will change the string # "monday" to "MON" and the string "sunday" to SUN in html documents # before sending to the client. <Directory "/var/www/docs/sed"> AddOutputFilter Sed html OutputSed "s/monday/MON/g" OutputSed "s/sunday/SUN/g" -</Directory> -+</Directory>Adding an input filter
-# In the following example, the sed filter will change the string +Adding an input filter
# In the following example, the sed filter will change the string # "monday" to "MON" and the string "sunday" to SUN in the POST data # sent to PHP. <Directory "/var/www/docs/sed"> AddInputFilter Sed php InputSed "s/monday/MON/g" InputSed "s/sunday/SUN/g" -</Directory> -+</Directory>diff --git a/docs/manual/mod/mod_sed.html.fr b/docs/manual/mod/mod_sed.html.fr index 47cca70816..8295c765fb 100644 --- a/docs/manual/mod/mod_sed.html.fr +++ b/docs/manual/mod/mod_sed.html.fr @@ -85,28 +85,24 @@ recherche/remplacement de chaExemple de configuration
-Ajout d'un filtre en sortie
-# Dans l'exemple suivant, le filtre sed va remplacer la chaîne +-Ajout d'un filtre en sortie
# Dans l'exemple suivant, le filtre sed va remplacer la chaîne # "monday" par "MON" et la chaîne "sunday" par "SUN" dans les # documents html avant de les envoyer au client. <Directory "/var/www/docs/sed"> AddOutputFilter Sed html OutputSed "s/monday/MON/g" OutputSed "s/sunday/SUN/g" -</Directory> -+</Directory>Ajout d'un filtre en entrée
- # Dans l'exemple suivant, le filtre sed va remplacer la chaîne +Ajout d'un filtre en entrée
# Dans l'exemple suivant, le filtre sed va remplacer la chaîne # "monday" par "MON" et la chaîne "sunday" par "SUN" dans les # données POST envoyées à PHP. <Directory "/var/www/docs/sed"> AddInputFilter Sed php InputSed "s/monday/MON/g" InputSed "s/sunday/SUN/g" -</Directory> -+</Directory>diff --git a/docs/manual/mod/mod_session.html.en b/docs/manual/mod/mod_session.html.en index 9ce8168dca..bf03a7d273 100644 --- a/docs/manual/mod/mod_session.html.en +++ b/docs/manual/mod/mod_session.html.en @@ -159,10 +159,8 @@ where the session will be stored. In this example, the session will be stored on the browser, in a cookie calledsession. -Browser based session
-Session On -SessionCookieName session path=/ -+Browser based session
Session On +SessionCookieName session path=/The session is not useful unless it can be written to or read from. The @@ -170,24 +168,20 @@ SessionCookieName session path=/ the use of a predetermined HTTP response header called
-X-Replace-Session.Writing to a session
-Session On +Writing to a session
Session On SessionCookieName session path=/ -SessionHeader X-Replace-Session -+SessionHeader X-Replace-SessionThe header should contain name value pairs expressed in the same format as a query string in a URL, as in the example below. Setting a key to the empty string has the effect of removing that key from the session.
-CGI to write to a session
-#!/bin/bash +CGI to write to a session
#!/bin/bash echo "Content-Type: text/plain" echo "X-Replace-Session: key1=foo&key2=&key3=bar" echo -env -+envIf configured, the session can be read back from the HTTP_SESSION @@ -195,12 +189,10 @@ env has to be explicitly turned on with the
-SessionEnvdirective.Read from a session
-Session On +Read from a session
Session On SessionEnv On SessionCookieName session path=/ -SessionHeader X-Replace-Session -+SessionHeader X-Replace-SessionOnce read, the CGI variable
-HTTP_SESSIONshould contain @@ -220,11 +212,9 @@ SessionHeader X-Replace-Session placed on the browser using themod_session_cryptomodule.Browser based encrypted session
-Session On +Browser based encrypted session
Session On SessionCryptoPassphrase secret -SessionCookieName session path=/ -+SessionCookieName session path=/The session will be automatically decrypted on load, and encrypted on @@ -258,11 +248,9 @@ SessionCookieName session path=/
Standard cookie parameters can be specified after the name of the cookie, as in the example below.
-Setting cookie parameters
-Session On +Setting cookie parameters
Session On SessionCryptoPassphrase secret -SessionCookieName session path=/private;domain=example.com;httponly;secure; -+SessionCookieName session path=/private;domain=example.com;httponly;secure;In cases where the Apache server forms the frontend for backend origin servers, @@ -281,16 +269,14 @@ SessionCookieName session path=/private;domain=example.com;httponly;secure;
-mod_auth_formsaves the user's login name and password within the session.Form based authentication
-Session On +Form based authentication
Session On SessionCryptoPassphrase secret SessionCookieName session path=/ AuthFormProvider file AuthUserFile conf/passwd AuthType form AuthName realm -#... -+#...See the
mod_auth_formmodule for documentation and complete diff --git a/docs/manual/mod/mod_session_cookie.html.en b/docs/manual/mod/mod_session_cookie.html.en index e7a549d728..e96c4a1666 100644 --- a/docs/manual/mod/mod_session_cookie.html.en +++ b/docs/manual/mod/mod_session_cookie.html.en @@ -79,10 +79,8 @@To create a simple session and store it in a cookie called session, configure the session as follows:
-Browser based session
-Session On -SessionCookieName session path=/ -+Browser based session
Session On +SessionCookieName session path=/For more examples on how the session can be configured to be read @@ -113,10 +111,8 @@ SessionCookieName session path=/ Apache. Ensure that your attributes are defined correctly as per the cookie specification.
-Cookie with attributes
-Session On -SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1; -+@@ -141,10 +137,8 @@ SessionCookieName session path=/private;domain=example.com;httponly;secure;versi Apache. Ensure that your attributes are defined correctly as per the cookie specification. -Cookie with attributes
Session On +SessionCookieName session path=/private;domain=example.com;httponly;secure;version=1;Cookie2 with attributes
-Session On -SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; -+diff --git a/docs/manual/mod/mod_session_crypto.html.en b/docs/manual/mod/mod_session_crypto.html.en index c0bdc684b4..fa8506af56 100644 --- a/docs/manual/mod/mod_session_crypto.html.en +++ b/docs/manual/mod/mod_session_crypto.html.en @@ -76,11 +76,9 @@Cookie2 with attributes
Session On +SessionCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;To create a simple encrypted session and store it in a cookie called session, configure the session as follows:
-Browser based encrypted session
-Session On +Browser based encrypted session
Session On SessionCookieName session path=/ -SessionCryptoPassphrase secret -+SessionCryptoPassphrase secretThe session will be encrypted with the given key. Different servers can @@ -133,24 +131,16 @@ SessionCryptoPassphrase secret
The NSS crypto driver requires some parameters for configuration, which are specified as parameters with optional values after the driver name.
-NSS without a certificate database
- SessionCryptoDriver nss -+-NSS without a certificate database
SessionCryptoDriver nssNSS with certificate database
- SessionCryptoDriver nss dir=certs -+-NSS with certificate database
SessionCryptoDriver nss dir=certs@@ -79,9 +77,7 @@ que le chiffrement fort ?NSS with certificate database and parameters
- SessionCryptoDriver nss dir=certs key3=key3.db cert7=cert7.db secmod=secmod -+-NSS with certificate database and parameters
SessionCryptoDriver nss dir=certs key3=key3.db cert7=cert7.db secmod=secmod-NSS with paths containing spaces
- SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmod -+NSS with paths containing spaces
SessionCryptoDriver nss "dir=My Certs" key3=key3.db cert7=cert7.db secmod=secmodThe NSS crypto driver might have already been @@ -160,9 +150,7 @@ SessionCryptoPassphrase secret existing configuration will have taken affect. To avoid this warning, use the noinit parameter as follows.
-@@ -245,8 +235,7 @@ peuvent se pr sous-expressions entre parenthèses correspondantes de regex. -NSS with certificate database
- SessionCryptoDriver nss noinit -+NSS with certificate database
SessionCryptoDriver nss noinitTo prevent confusion, ensure that all modules requiring NSS are configured with @@ -171,9 +159,7 @@ SessionCryptoPassphrase secret
The openssl crypto driver supports an optional parameter to specify the engine to be used for encryption.
-diff --git a/docs/manual/mod/mod_session_dbd.html.en b/docs/manual/mod/mod_session_dbd.html.en index 5f23f9ccbe..53cb4b050e 100644 --- a/docs/manual/mod/mod_session_dbd.html.en +++ b/docs/manual/mod/mod_session_dbd.html.en @@ -96,15 +96,13 @@ to update an existing session, to insert a new session, and to delete an expired or empty session. These queries are configured as per the example below. -OpenSSL with engine support
- SessionCryptoDriver openssl engine=name -+@@ -205,16 +191,14 @@ SessionCryptoPassphrase secretOpenSSL with engine support
SessionCryptoDriver openssl engine=nameIf the value begins with exec: the resulting command will be executed and the first line returned to standard output by the program will be used as the key.
--#key used as-is ++SessionCryptoPassphrase "exec:/path/to/otherProgram argument1"#key used as-is SessionCryptoPassphrase secret #Run /path/to/program to get key SessionCryptoPassphrase exec:/path/to/program #Run /path/to/otherProgram and provide arguments -SessionCryptoPassphrase "exec:/path/to/otherProgram argument1" -@@ -119,10 +117,8 @@ DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" clean table called apachesession, and save the session ID in a cookie called session, configure the session as follows: -Sample DBD configuration
-DBDriver pgsql +Sample DBD configuration
DBDriver pgsql DBDParams "dbname=apachesession user=apache password=xxxxx host=localhost" DBDPrepareSQL "delete from session where key = %s" deletesession DBDPrepareSQL "update session set value = %s, expiry = %lld, key = %s where key = %s" updatesession DBDPrepareSQL "insert into session (value, expiry, key) values (%s, %lld, %s)" insertsession DBDPrepareSQL "select value from session where key = %s and (expiry = 0 or expiry > %lld)" selectsession -DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession -+DBDPrepareSQL "delete from session where expiry != 0 and expiry < %lld" cleansession@@ -131,10 +125,8 @@ casseSQL based anonymous session
-Session On -SessionDBDCookieName session path=/ -+SQL based anonymous session
Session On +SessionDBDCookieName session path=/For more examples on how the session can be configured to be read @@ -151,10 +147,8 @@ SessionDBDCookieName session path=/ table called apachesession, and with the session keyed to the userid, configure the session as follows:
-@@ -190,10 +184,8 @@ SessionDBDPerUser On Apache. Ensure that your attributes are defined correctly as per the cookie specification. -SQL based per user session
-Session On -SessionDBDPerUser On -+SQL based per user session
Session On +SessionDBDPerUser On@@ -237,8 +227,7 @@ of value and replace them by parenthesized subexpressions of regex. -Cookie with attributes
-Session On -SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1; -+@@ -218,10 +210,8 @@ SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;ve Apache. Ensure that your attributes are defined correctly as per the cookie specification. -Cookie with attributes
Session On +SessionDBDCookieName session path=/private;domain=example.com;httponly;secure;version=1;@@ -129,20 +123,16 @@ respect to case semantically identical to theCookie2 with attributes
-Session On -SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1; -+diff --git a/docs/manual/mod/mod_setenvif.html.en b/docs/manual/mod/mod_setenvif.html.en index 599af4c832..f3e6ce177e 100644 --- a/docs/manual/mod/mod_setenvif.html.en +++ b/docs/manual/mod/mod_setenvif.html.en @@ -50,10 +50,8 @@ on characteristics of the request such as this example, which setsCookie2 with attributes
Session On +SessionDBDCookieName2 session path=/private;domain=example.com;httponly;secure;version=1;netscapeif the browser is mozilla but not MSIE. --BrowserMatch ^Mozilla netscape -BrowserMatch MSIE !netscape -+BrowserMatch ^Mozilla netscape +BrowserMatch MSIE !netscapeWhen the server looks up a path via an internal @@ -97,18 +95,14 @@ BrowserMatch MSIE !netscape sets environment variables conditional on the
-User-AgentHTTP request header. The following two lines have the same effect:-BrowserMatchNoCase Robot is_a_robot -SetEnvIfNoCase User-Agent Robot is_a_robot -+BrowserMatchNoCase Robot is_a_robot +SetEnvIfNoCase User-Agent Robot is_a_robotSome additional examples:
--BrowserMatch ^Mozilla forms jpeg=yes browser=netscape +BrowserMatch ^Mozilla forms jpeg=yes browser=netscape BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript -BrowserMatch MSIE !javascript -+BrowserMatch MSIE !javascriptBrowserMatchdirective. However, it provides for case-insensitive matching. For example: --BrowserMatchNoCase mac platform=macintosh -BrowserMatchNoCase win platform=windows -+BrowserMatchNoCase mac platform=macintosh +BrowserMatchNoCase win platform=windowsThe
-BrowserMatchandBrowserMatchNoCasedirectives are special cases of theSetEnvIfandSetEnvIfNoCasedirectives. The following two lines have the same effect:-BrowserMatchNoCase Robot is_a_robot -SetEnvIfNoCase User-Agent Robot is_a_robot -+BrowserMatchNoCase Robot is_a_robot +SetEnvIfNoCase User-Agent Robot is_a_robot-SetEnvIf Request_URI "\.gif$" object_is_image=gif +SetEnvIf Request_URI "\.gif$" object_is_image=gif SetEnvIf Request_URI "\.jpg$" object_is_image=jpg SetEnvIf Request_URI "\.xbm$" object_is_image=xbm @@ -246,8 +235,7 @@ SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral SetEnvIf object_is_image xbm XBIT_PROCESSING=1 -SetEnvIf ^TS ^[a-z] HAVE_TS -+SetEnvIf ^TS ^[a-z] HAVE_TSThe first three will set the environment variable @@ -285,9 +273,7 @@ for additional examples.
-ap_expr. These expressions will be evaluated at runtime, and applied env-variable in the same fashion asSetEnvIf.- SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered -+SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_deliveredThis would set the environment variable
iso_delivered@@ -296,9 +282,7 @@ for additional examples.A more useful example would be to set the variable rfc1918 if the remote IP address is a private address according to RFC 1918:
-- SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918 -+SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918See also
@@ -328,9 +312,7 @@ without respect to case theSetEnvIfdirective, and differs only in that the regular expression matching is performed in a case-insensitive manner. For example: -- SetEnvIfNoCase Host Example\.Org site=example -+SetEnvIfNoCase Host Example\.Org site=exampleThis will cause the
-siteenvironment variable diff --git a/docs/manual/mod/mod_setenvif.html.fr b/docs/manual/mod/mod_setenvif.html.fr index e34548e078..ac7bdb8909 100644 --- a/docs/manual/mod/mod_setenvif.html.fr +++ b/docs/manual/mod/mod_setenvif.html.fr @@ -52,10 +52,8 @@ de caract exemple qui définit netscape si le navigateur est Mozilla et non MSIE.-BrowserMatch ^Mozilla netscape -BrowserMatch MSIE !netscape -+BrowserMatch ^Mozilla netscape +BrowserMatch MSIE !netscapeLorsque le serveur cherche un chemin via une sous-requête interne (par exemple la @@ -99,18 +97,14 @@ contenu de l'en-t d'environnement en fonction du contenu de l'en-tête de requête HTTP
-User-Agent. Les deux lignes suivantes produisent le même effet :-BrowserMatchNoCase Robot is_a_robot -SetEnvIfNoCase User-Agent Robot is_a_robot -+BrowserMatchNoCase Robot is_a_robot +SetEnvIfNoCase User-Agent Robot is_a_robotQuelques exemples supplémentaires :
--BrowserMatch ^Mozilla forms jpeg=yes browser=netscape +BrowserMatch ^Mozilla forms jpeg=yes browser=netscape BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript -BrowserMatch MSIE !javascript -+BrowserMatch MSIE !javascriptLa directive
-BrowserMatchNoCaseest identique sur le plan sémantique à la directiveBrowserMatch. Elle permet cependant une comparaison insensible à la casse. Par exemple :-BrowserMatchNoCase mac platform=macintosh -BrowserMatchNoCase win platform=windows -+BrowserMatchNoCase mac platform=macintosh +BrowserMatchNoCase win platform=windowsLes directives
-BrowserMatchet @@ -142,10 +134,8 @@ BrowserMatchNoCase win platform=windows des directivesSetEnvIfetSetEnvIfNoCase. Ainsi, les deux lignes suivantes produisent le même effet :-BrowserMatchNoCase Robot is_a_robot -SetEnvIfNoCase User-Agent Robot is_a_robot -+BrowserMatchNoCase Robot is_a_robot +SetEnvIfNoCase User-Agent Robot is_a_robot-SetEnvIf Request_URI "\.gif$" object_is_image=gif +SetEnvIf Request_URI "\.gif$" object_is_image=gif SetEnvIf Request_URI "\.jpg$" object_is_image=jpg SetEnvIf Request_URI "\.xbm$" object_is_image=xbm @@ -254,8 +243,7 @@ SetEnvIf Referer www\.mydomain\.example\.com intra_site_referral SetEnvIf object_is_image xbm XBIT_PROCESSING=1 -SetEnvIf ^TS ^[a-z] HAVE_TS -+SetEnvIf ^TS ^[a-z] HAVE_TSLes trois premières lignes définissent la variable @@ -296,9 +284,7 @@ serveur HTTP Apache pour des exemples suppl d'environnement env-variable de la même manière que la directive
-SetEnvIf.- SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_delivered -+SetEnvIfExpr "tolower(req('X-Sendfile')) == 'd:\images\very_big.iso')" iso_deliveredDans cet exemple, la variable d'environnement @@ -309,9 +295,7 @@ serveur HTTP Apache pour des exemples suppl l'adresse IP distante est une adresse privée au sens de la RFC 1918 :
-- SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918 -+SetEnvIfExpr "-R '10.0.0.0/8' || -R '172.16.0.0/12' || -R '192.168.0.0/16'" rfc1918Voir aussi
@@ -341,9 +325,7 @@ attributs de la requ d'un point de vue sémantique à la directiveSetEnvIf, et ne s'en distingue que par le fait que la comparaison des expressions rationnelles est effectuée sans tenir compte de la casse. Par exemple : -- SetEnvIfNoCase Host Example\.Org site=apache -+SetEnvIfNoCase Host Example\.Org site=apacheCette ligne va définir la variable d'environnement diff --git a/docs/manual/mod/mod_so.html.en b/docs/manual/mod/mod_so.html.en index f0f17dae4b..3e42d2157b 100644 --- a/docs/manual/mod/mod_so.html.en +++ b/docs/manual/mod/mod_so.html.en @@ -181,9 +181,7 @@ of active modules
-modulein the file, and is listed as the Module Identifier in the module documentation. Example:- LoadModule status_module modules/mod_status.so -+LoadModule status_module modules/mod_status.soloads the named module from the modules subdirectory of the diff --git a/docs/manual/mod/mod_so.html.fr b/docs/manual/mod/mod_so.html.fr index 638262a79c..0cf37b02b3 100644 --- a/docs/manual/mod/mod_so.html.fr +++ b/docs/manual/mod/mod_so.html.fr @@ -196,9 +196,7 @@ actifs
-moduledans le fichier, et est référencé comme Identificateur de module dans la documentation des modules. Exemple :- LoadModule status_module modules/mod_status.so -+LoadModule status_module modules/mod_status.socharge le module spécifié depuis le sous-répertoire des modules diff --git a/docs/manual/mod/mod_ssl.html.en b/docs/manual/mod/mod_ssl.html.en index 385805f002..cad25af326 100644 --- a/docs/manual/mod/mod_ssl.html.en +++ b/docs/manual/mod/mod_ssl.html.en @@ -247,9 +247,7 @@ you find in the above table.
For backward compatibility there is additionally a special ``%{name}c'' cryptography format function provided. Information about this function is provided in the Compatibility chapter. -Example
-CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" -+Example
CustomLog logs/ssl_request_log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"@@ -293,9 +291,7 @@ string in-mod_log_conf encrypted with SSL. This is similar to theSSLRequireSSLdirective. -- Require ssl -+Require ssl@@ -309,10 +305,8 @@ string inmod_log_confThe following example grants access if the user is authenticated either with a client certificate or by username and password.
-- Require ssl-verify-client+
- Require valid-user -Require ssl-verify-client@@ -335,9 +329,7 @@ with. These are used for Client Authentication. Such a file is simply the concatenation of the various PEM-encoded Certificate files, in order of preference. This can be used alternatively and/or additionally to
+ Require valid-userSSLCACertificatePath. -@@ -361,9 +353,7 @@ hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-valueExample
-SSLCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt -+Example
SSLCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-client.crt.N. And you should always make sure this directory contains the appropriate symbolic links. -@@ -401,9 +391,7 @@ directives. specify an all-in-one file containing a concatenation of PEM-encoded CA certificates. -Example
-SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/ -+Example
SSLCACertificatePath /usr/local/apache2/conf/ssl.crt/@@ -428,9 +416,7 @@ through hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-valueExample
-SSLCADNRequestFile /usr/local/apache2/conf/ca-names.crt -+Example
SSLCADNRequestFile /usr/local/apache2/conf/ca-names.crt.N. And you should always make sure this directory contains the appropriate symbolic links. -@@ -466,9 +452,7 @@ to succeed - otherwise it will fail with anExample
-SSLCADNRequestPath /usr/local/apache2/conf/ca-names.crt/ -+Example
SSLCADNRequestPath /usr/local/apache2/conf/ca-names.crt/"unable to get certificate CRL"error.@@ -489,9 +473,7 @@ Authorities (CA) whose clients you deal with. These are used for Client Authentication. Such a file is simply the concatenation of the various PEM-encoded CRL files, in order of preference. This can be used alternatively and/or additionally toExample
-SSLCARevocationCheck chain -+Example
SSLCARevocationCheck chainSSLCARevocationPath. -@@ -515,9 +497,7 @@ hash filenames. So usually you have not only to place the CRL files there. Additionally you have to create symbolic links named hash-valueExample
-SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl -+Example
SSLCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-client.crl.rN. And you should always make sure this directory contains the appropriate symbolic links. -@@ -561,9 +541,7 @@ But be careful: Providing the certificate chain works only if you are using a using a coupled RSA+DSA certificate pair, this will work only if actually both certificates use the same certificate chain. Else the browsers will be confused in this situation. -Example
-SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/ -+Example
SSLCARevocationPath /usr/local/apache2/conf/ssl.crl/@@ -623,9 +601,7 @@ such issues.Example
-SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt -+Example
SSLCertificateChainFile /usr/local/apache2/conf/ssl.crt/ca.crt@@ -652,9 +628,7 @@ to support multiple algorithms for server authentication. For each directive, there must be a matchingExample
-SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt -+Example
SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crtSSLCertificateFiledirective. -@@ -785,20 +759,16 @@ between speed and security. Next, include high and medium security ciphers. Finally, remove all ciphers which do not authenticate, i.e. for SSL the Anonymous Diffie-Hellman ciphers, as well as all ciphers which useExample
-SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key -+Example
SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.keyMD5as hash algorithm, because it has been proven insufficient. --$ openssl ciphers -v 'RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5' ++KRB5-RC4-SHA SSLv3 Kx=KRB5 Au=KRB5 Enc=RC4(128) Mac=SHA1$ openssl ciphers -v 'RC4-SHA:AES128-SHA:HIGH:MEDIUM:!aNULL:!MD5' RC4-SHA SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=SHA1 AES128-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(128) Mac=SHA1 DHE-RSA-AES256-SHA SSLv3 Kx=DH Au=RSA Enc=AES(256) Mac=SHA1 ... ... ... ... ... SEED-SHA SSLv3 Kx=RSA Au=RSA Enc=SEED(128) Mac=SHA1 PSK-RC4-SHA SSLv3 Kx=PSK Au=PSK Enc=RC4(128) Mac=SHA1 -KRB5-RC4-SHA SSLv3 Kx=KRB5 Au=KRB5 Enc=RC4(128) Mac=SHA1 -The complete list of particular RSA & DH ciphers for SSL is given in Table 2.
-@@ -130,13 +122,11 @@ Intranet website, for clients coming from the Internet? need to do is to create client certificates signed by your own CA certificate (Example
-SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW -+Example
SSLCipherSuite RSA:!EXP:!NULL:+HIGH:+MEDIUM:-LOW@@ -869,10 +839,8 @@ separate "-engine" releases of OpenSSL 0.9.6 must be used.
-To discover which engine names are supported, run the command "
-openssl engine".@@ -891,12 +859,10 @@ This directive toggles the usage of the SSL/TLS Protocol Engine. This is should be used inside aExample
-# For a Broadcom accelerator: -SSLCryptoDevice ubsec -+Example
# For a Broadcom accelerator: +SSLCryptoDevice ubsec<VirtualHost>section to enable SSL/TLS for a that virtual host. By default the SSL/TLS Protocol Engine is disabled for both the main server and all configured virtual hosts. --Example
-<VirtualHost _default_:443> +Example
<VirtualHost _default_:443> SSLEngine on #... -</VirtualHost> -+</VirtualHost>In Apache 2.1 and later,
SSLEnginecan be set tooptional. This enables support for @@ -946,9 +912,7 @@ by the applicable Security Policy.When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the client's preference is used. If this directive is enabled, the server's preference will be used instead.
-@@ -984,9 +948,7 @@ the Man-in-the-Middle prefix attack as described in CVE-2009-3555.Example
-SSLHonorCipherOrder on -+Example
SSLHonorCipherOrder on-Example
-SSLInsecureRenegotiation on -+Example
SSLInsecureRenegotiation onThe
-SSL_SECURE_RENEGenvironment variable can be used @@ -1032,12 +994,10 @@ itself, or derived by configuration; see theSSLOCSPOverrideResponderdirectives.@@ -1132,13 +1092,11 @@ as an alternative to existing directives (such as though it should be noted that the syntax / allowable values for the parameters may sometimes differ. -Example
-SSLVerifyClient on +Example
SSLVerifyClient on SSLOCSPEnable on SSLOCSPDefaultResponder http://responder.example.com:8888/responder -SSLOCSPOverrideResponder on -+SSLOCSPOverrideResponder on@@ -1248,12 +1206,10 @@ The available options are: -Examples
-SSLOpenSSLConfCmd Options -SessionTicket,ServerPreference +Examples
SSLOpenSSLConfCmd Options -SessionTicket,ServerPreference SSLOpenSSLConfCmd ECDHParameters brainpoolP256r1 SSLOpenSSLConfCmd ServerInfoFile /usr/local/apache2/conf/server-info.pem SSLOpenSSLConfCmd Protocol "-ALL, TLSv1.2" -SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256 -+SSLOpenSSLConfCmd SignatureAlgorithms RSA+SHA384:ECDSA+SHA256@@ -1330,9 +1286,7 @@ query can be done in two ways which can be configured by The reuse-algorithm above is used here, too. In other words: The external program is called only once per unique Pass Phrase. -Example
-SSLOptions +FakeBasicAuth -StrictRequire +Example
SSLOptions +FakeBasicAuth -StrictRequire <Files ~ "\.(cgi|shtml)$"> SSLOptions +StdEnvVars -ExportCertData -<Files> -+<Files>@@ -1381,9 +1335,7 @@ The available (case-insensitive) protocols are: - when using OpenSSL 1.0.1 and later - ``Example
-SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter -+Example
SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter+SSLv3 +TLSv1 +TLSv1.1 +TLSv1.2, respectively. -@@ -1404,9 +1356,7 @@ with. These are used for Remote Server Authentication. Such a file is simply the concatenation of the various PEM-encoded Certificate files, in order of preference. This can be used alternatively and/or additionally toExample
-SSLProtocol TLSv1 -+Example
SSLProtocol TLSv1SSLProxyCACertificatePath. -@@ -1430,9 +1380,7 @@ hash filenames. So usually you can't just place the Certificate files there: you also have to create symbolic links named hash-valueExample
-SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt -+Example
SSLProxyCACertificateFile /usr/local/apache2/conf/ssl.crt/ca-bundle-remote-server.crt.N. And you should always make sure this directory contains the appropriate symbolic links. -@@ -1469,9 +1417,7 @@ to succeed - otherwise it will fail with anExample
-SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/ -+Example
SSLProxyCACertificatePath /usr/local/apache2/conf/ssl.crt/"unable to get certificate CRL"error.@@ -1492,9 +1438,7 @@ Authorities (CA) whose remote servers you deal with. These are used for Remote Server Authentication. Such a file is simply the concatenation of the various PEM-encoded CRL files, in order of preference. This can be used alternatively and/or additionally toExample
-SSLProxyCARevocationCheck chain -+Example
SSLProxyCARevocationCheck chainSSLProxyCARevocationPath. -@@ -1518,9 +1462,7 @@ hash filenames. So usually you have not only to place the CRL files there. Additionally you have to create symbolic links named hash-valueExample
-SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl -+Example
SSLProxyCARevocationFile /usr/local/apache2/conf/ssl.crl/ca-bundle-remote-server.crl.rN. And you should always make sure this directory contains the appropriate symbolic links. -@@ -1546,9 +1488,7 @@ SSLProxyCheckPeerCN has been superseded by setting is only taken into account whenExample
-SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/ -+Example
SSLProxyCARevocationPath /usr/local/apache2/conf/ssl.crl/SSLProxyCheckPeerName offis specified at the same time. -@@ -1568,9 +1508,7 @@ This directive sets whether it is checked if the remote server certificate is expired or not. If the check fails a 502 status code (Bad Gateway) is sent. -Example
-SSLProxyCheckPeerCN on -+Example
SSLProxyCheckPeerCN on@@ -1643,12 +1581,10 @@ forward proxy (using <Proxy> or <ProxyRequest> directives. SSLProxyEngine is not required to enable a forward proxy server to proxy SSL/TLS requests. -Example
-SSLProxyCheckPeerExpire on -+Example
SSLProxyCheckPeerExpire on@@ -1678,9 +1614,7 @@ be examined and a chain of trust will be constructed. trusted as if they were also inExample
-<VirtualHost _default_:443> +Example
<VirtualHost _default_:443> SSLProxyEngine on #... -</VirtualHost> -+</VirtualHost>SSLProxyCACertificateFile. -@@ -1706,9 +1640,7 @@ or additionally toExample
-SSLProxyMachineCertificateChainFile /usr/local/apache2/conf/ssl.crt/proxyCA.pem -+Example
SSLProxyMachineCertificateChainFile /usr/local/apache2/conf/ssl.crt/proxyCA.pemSSLProxyMachineCertificatePath.-Currently there is no support for encrypted private keys
@@ -1733,9 +1665,7 @@ directory contains the appropriate symbolic links.Example
-SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem -+Example
SSLProxyMachineCertificateFile /usr/local/apache2/conf/ssl.crt/proxy.pem-Currently there is no support for encrypted private keys
@@ -1792,9 +1722,7 @@ The following levels are available for level: optional doesn't work with all servers and level optional_no_ca is actually against the idea of authentication (but can be used to establish SSL test pages, etc.) -Example
-SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/ -+Example
SSLProxyMachineCertificatePath /usr/local/apache2/conf/proxy.crt/@@ -1820,9 +1748,7 @@ remote server certificates are accepted only, the default depth of 1 means the remote server certificate can be self-signed or has to be signed by a CA which is directly known to the server (i.e. the CA's certificate is underExample
-SSLProxyVerify require -+Example
SSLProxyVerify requireSSLProxyCACertificatePath), etc. -@@ -1901,15 +1827,13 @@ The following source variants are available: /crypto/) to seed the PRNG. Use this if no random device exists on your platform. -Example
-SSLProxyVerifyDepth 10 -+Example
SSLProxyVerifyDepth 10@@ -1938,9 +1862,7 @@ will be untrusted so a denial of service attack by consumption of memory must be considered when changing this configuration setting. -Example
-SSLRandomSeed startup builtin +Example
SSLRandomSeed startup builtin SSLRandomSeed startup file:/dev/random SSLRandomSeed startup file:/dev/urandom 1024 SSLRandomSeed startup exec:/usr/local/bin/truerand 16 SSLRandomSeed connect builtin SSLRandomSeed connect file:/dev/random -SSLRandomSeed connect file:/dev/urandom 1024 -+SSLRandomSeed connect file:/dev/urandom 1024@@ -1986,8 +1908,7 @@ containing any number of access checks. The expression must match the following syntax (given as a BNF grammar notation):Example
-SSLRenegBufferSize 262144 -+Example
SSLRenegBufferSize 262144--expr ::= "true" | "false" +expr ::= "true" | "false" | "!" expr | expr "&&" expr | expr "||" expr @@ -2016,8 +1937,7 @@ word ::= digit digit ::= [0-9]+ cstring ::= "..." variable ::= "%{" varname "}" -function ::= funcname "(" funcargs ")" -+function ::= funcname "(" funcargs ")"For
-varnameany of the variables described in Environment Variables can be used. Forfuncnamethe available functions are listed in @@ -2029,14 +1949,12 @@ during request processing. In .htaccess context, the expression is both parsed and executed each time the .htaccess file is encountered during request processing.Example
-SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \ +Example
SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)-/ \ and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ and %{TIME_WDAY} -ge 1 and %{TIME_WDAY} -le 5 \ and %{TIME_HOUR} -ge 8 and %{TIME_HOUR} -le 20 ) \ - or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ -+ or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/The
-PeerExtList(object-ID)function expects @@ -2047,9 +1965,7 @@ exactly against the value of an extension identified with this OID. (If multiple extensions with the same OID are present, at least one extension must match).Example
-SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6") -+Example
SSLRequire "foobar" in PeerExtList("1.2.3.4.5.6")Notes on the PeerExtList function
@@ -2099,9 +2015,7 @@ the current connection. This is very handy inside the SSL-enabled virtual host or directories for defending against configuration errors that expose stuff that should be protected. When this directive is present all requests are denied which are not using SSL. -@@ -2171,10 +2085,8 @@ The following five storage types are currently supported: -Example
-SSLRequireSSL -+Example
SSLRequireSSL-Examples
-SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data -SSLSessionCache shmcb:/usr/local/apache/logs/ssl_gcache_data(512000) -+Examples
SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data +SSLSessionCache shmcb:/usr/local/apache/logs/ssl_gcache_data(512000)The
-ssl-cachemutex is used to serialize access to @@ -2198,9 +2110,7 @@ This directive sets the timeout in seconds for the information stored in the global/inter-process SSL Session Cache and the OpenSSL internal memory cache. It can be set as low as 15 for testing, but should be set to higher values like 300 in real life.@@ -2468,9 +2378,7 @@ This option is only available if httpd was compiled against an SNI capable version of OpenSSL.Example
-SSLSessionCacheTimeout 600 -+Example
SSLSessionCacheTimeout 600@@ -2495,9 +2403,7 @@ any of the SSL environment variables. instead controls the value of the username embedded within the basic authentication header (see SSLOptions). -Example
-SSLStrictSNIVHostCheck on -+Example
SSLStrictSNIVHostCheck on@@ -2568,9 +2474,7 @@ The following levels are available for level: optional doesn't work with all browsers and level optional_no_ca is actually against the idea of authentication (but can be used to establish SSL test pages, etc.) -Example
-SSLUserName SSL_CLIENT_S_DN_CN -+Example
SSLUserName SSL_CLIENT_S_DN_CN@@ -2602,9 +2506,7 @@ certificates are accepted only, the default depth of 1 means the client certificate can be self-signed or has to be signed by a CA which is directly known to the server (i.e. the CA's certificate is underExample
-SSLVerifyClient require -+Example
SSLVerifyClient requireSSLCACertificatePath), etc. -diff --git a/docs/manual/mod/mod_status.html.en b/docs/manual/mod/mod_status.html.en index 4cad833d76..e5c35ed725 100644 --- a/docs/manual/mod/mod_status.html.en +++ b/docs/manual/mod/mod_status.html.en @@ -94,12 +94,10 @@ performanceExample
-SSLVerifyDepth 10 -+Example
SSLVerifyDepth 10To enable status reports only for browsers from the example.com domain add this code to your
-httpd.confconfiguration file-<Location /server-status> +<Location /server-status> SetHandler server-status Require host example.com -</Location> -+</Location>You can now access server statistics by using a Web browser diff --git a/docs/manual/mod/mod_status.html.fr b/docs/manual/mod/mod_status.html.fr index 73c1368d4a..a6f5393b7e 100644 --- a/docs/manual/mod/mod_status.html.fr +++ b/docs/manual/mod/mod_status.html.fr @@ -96,12 +96,10 @@ du serveur
Pour n'activer les rapports d'état que pour les navigateurs appartenant au domaine example.com, ajoutez ces lignes à votre fichier de configuration
-httpd.conf:-<Location /etat-serveur> +<Location /etat-serveur> SetHandler server-status Require host example.com -</Location> -+</Location>Il est alors possible d'obtenir les statistiques du serveur en diff --git a/docs/manual/mod/mod_substitute.html.en b/docs/manual/mod/mod_substitute.html.en index b0051ee8a0..259ae53a20 100644 --- a/docs/manual/mod/mod_substitute.html.en +++ b/docs/manual/mod/mod_substitute.html.en @@ -78,34 +78,28 @@ or regex of a subsequent one. -
@@ -212,9 +202,7 @@ CustomLog logs/clickstream.log usertrackExample
-<Location /> +Example
<Location /> AddOutputFilterByType SUBSTITUTE text/html Substitute s/foo/bar/ni -</Location> -+</Location>If either the pattern or the substitution contain a slash character then an alternative delimiter should be used:
-@@ -187,9 +179,7 @@ CustomLog logs/clickstream.log usertrack three of these formats, withExample of using an alternate delimiter
-<Location /> +Example of using an alternate delimiter
<Location /> AddOutputFilterByType SUBSTITUTE text/html Substitute "s|<BR */?>|<br />|i" -</Location> -+</Location>Backreferences can be used in the comparison and in the substitution, when regular expressions are used, as illustrated in the following example:
-@@ -148,9 +142,7 @@ CustomLog logs/clickstream.log usertrack unpredictable if you use a name containing unusual characters. Valid characters include A-Z, a-z, 0-9, "_", and "-". -Example of using backreferences and captures
-<Location /> +Example of using backreferences and captures
<Location /> AddOutputFilterByType SUBSTITUTE text/html # "foo=k,bar=k" -> "foo/bar=k" Substitute "s|foo=(\w+),bar=\1|foo/bar=$1" -</Location> -+</Location>A common use scenario for
mod_substituteis the @@ -117,12 +111,10 @@In this case,
-mod_substutitecan be used to rewrite those URLs into something that will work from the front end:@@ -123,9 +119,7 @@ CustomLog logs/clickstream.log usertrackRewriting URLs embedded in proxied content
-ProxyPass /blog/ http://internal.blog.example.com +Rewriting URLs embedded in proxied content
ProxyPass /blog/ http://internal.blog.example.com ProxyPassReverse /blog/ http://internal.blog.example.com/ -Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i" -+Substitute "s|http://internal.blog.example.com/|http://www.example.com/blog/|i"-
ProxyPassReversediff --git a/docs/manual/mod/mod_suexec.html.en b/docs/manual/mod/mod_suexec.html.en index 8fbac493da..1258322a54 100644 --- a/docs/manual/mod/mod_suexec.html.en +++ b/docs/manual/mod/mod_suexec.html.en @@ -61,9 +61,7 @@ and Group to specify a user and group for CGI programs to run as. Non-CGI requests are still processed with the user specified in theUserdirective.-Example
- SuexecUserGroup nobody nogroup -+Example
SuexecUserGroup nobody nogroupIn Apache httpd 2.3.9 and later, startup will fail if this diff --git a/docs/manual/mod/mod_unixd.html.en b/docs/manual/mod/mod_unixd.html.en index 3e243fb9b4..4d9b0cfb24 100644 --- a/docs/manual/mod/mod_unixd.html.en +++ b/docs/manual/mod/mod_unixd.html.en @@ -90,9 +90,7 @@ requests
Refers to a group by its number. -@@ -96,9 +94,7 @@ CustomLog logs/clickstream.log usertrack level domain (for exampleExample
- Group www-group -+Example
Group www-groupIt is recommended that you set up a new group specifically for diff --git a/docs/manual/mod/mod_userdir.html.en b/docs/manual/mod/mod_userdir.html.en index 59dacd2d24..f9766b8ecb 100644 --- a/docs/manual/mod/mod_userdir.html.en +++ b/docs/manual/mod/mod_userdir.html.en @@ -134,26 +134,20 @@ tutorial
To allow a few users to have
-UserDirdirectories, but not anyone else, use the following:-UserDir disabled -UserDir enabled user1 user2 user3 -+UserDir disabled +UserDir enabled user1 user2 user3To allow most users to have
-UserDirdirectories, but deny this to a few, use the following:- UserDir disabled user4 user5 user6 -+UserDir disabled user4 user5 user6It is also possible to specify alternative user directories. If you use a command like:
-- UserDir public_html /usr/web http://www.example.com/ -+UserDir public_html /usr/web http://www.example.com/With a request for diff --git a/docs/manual/mod/mod_usertrack.html.en b/docs/manual/mod/mod_usertrack.html.en index f57ede6f54..c0bce00749 100644 --- a/docs/manual/mod/mod_usertrack.html.en +++ b/docs/manual/mod/mod_usertrack.html.en @@ -57,10 +57,8 @@
-
mod_usertracksets a cookie which can be logged viamod_log_configconfigurable logging formats:-LogFormat "%{Apache}n %r %t" usertrack -CustomLog logs/clickstream.log usertrack -+LogFormat "%{Apache}n %r %t" usertrack +CustomLog logs/clickstream.log usertrack.example.co.uk).- CookieDomain .example.com -+CookieDomain .example.comIf this directive is not used, cookies last only for the current browser session.
-- CookieExpires "3 weeks" -+CookieExpires "3 weeks"- CookieName clicktrack -+CookieName clicktrackCookie2being the preferred format. -- CookieStyle Cookie2 -+CookieStyle Cookie2mod_usertrackwill not activate cookies. -- CookieTracking on -+CookieTracking ondiff --git a/docs/manual/mod/mod_version.html.en b/docs/manual/mod/mod_version.html.en index 749a672323..dde92d40e9 100644 --- a/docs/manual/mod/mod_version.html.en +++ b/docs/manual/mod/mod_version.html.en @@ -40,15 +40,13 @@ allows a flexible version checking including numeric comparisons and regular expressions. -Examples
-<IfVersion 2.4.2> +Examples
<IfVersion 2.4.2> # current httpd version is exactly 2.4.2 </IfVersion> <IfVersion >= 2.5> # use really new features :-) -</IfVersion> -+</IfVersion>See below for further possibilities.
@@ -94,12 +92,10 @@httpd version is less or equal @@ -144,10 +142,8 @@ VirtualScriptAlias /never/found/%0/cgi-bin/Example
-<IfVersion >= 2.3> +Example
<IfVersion >= 2.3> # this happens only in versions greater or # equal 2.3.0. -</IfVersion> -+</IfVersion>Besides the numerical comparison it is possible to match a @@ -115,21 +111,17 @@
regex-Example
-<IfVersion = /^2.4.[01234]$/> +Example
<IfVersion = /^2.4.[01234]$/> # e.g. workaround for buggy versions -</IfVersion> -+</IfVersion>In order to reverse the meaning, all operators can be preceded by an exclamation mark (
-!):-<IfVersion !~ ^2.4.[01234]$> +<IfVersion !~ ^2.4.[01234]$> # not for those versions -</IfVersion> -+</IfVersion>If the operator is omitted, it is assumed to be diff --git a/docs/manual/mod/mod_vhost_alias.html.en b/docs/manual/mod/mod_vhost_alias.html.en index f278a5dae0..996083a906 100644 --- a/docs/manual/mod/mod_vhost_alias.html.en +++ b/docs/manual/mod/mod_vhost_alias.html.en @@ -48,10 +48,8 @@ hosting /cgi-bin/script.pl to
-/usr/local/apache2/cgi-bin/script.plin all cases:-ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/ -VirtualScriptAlias /never/found/%0/cgi-bin/ -+ScriptAlias /cgi-bin/ /usr/local/apache2/cgi-bin/ +VirtualScriptAlias /never/found/%0/cgi-bin/For simple name-based virtual hosts you might use the following directives in your server configuration file:
--UseCanonicalName Off -VirtualDocumentRoot /usr/local/apache/vhosts/%0 -+UseCanonicalName Off +VirtualDocumentRoot /usr/local/apache/vhosts/%0A request for @@ -161,10 +157,8 @@ VirtualDocumentRoot /usr/local/apache/vhosts/%0
-vhostsdirectory. To do this you might use the following in your configuration file:-UseCanonicalName Off -VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2 -+UseCanonicalName Off +VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2A request for @@ -175,9 +169,7 @@ VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2
A more even spread of files can be achieved by hashing from the end of the name, for example:
-- VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2 -+VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.-1/%2.-2/%2.-3/%2The example request would come from @@ -185,9 +177,7 @@ VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2
Alternatively you might use:
-- VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+ -+VirtualDocumentRoot /usr/local/apache/vhosts/%3+/%2.1/%2.2/%2.3/%2.4+The example request would come from @@ -204,9 +194,7 @@ tld, for example
-example.comregardless of the number of subdomains to the hostname. As such, one can make a configuration that will direct all first, second or third level subdomains to the same directory:- VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0" -+VirtualDocumentRoot "/usr/local/apache/vhosts/%-2.0.%-1.0"In the example above, both
-www.example.comas well aswww.sub.example.com@@ -216,11 +204,9 @@ orexample.comwill all point to/usr/local/apache/vhosts/exaFor IP-based virtual hosting you might use the following in your configuration file:
--UseCanonicalName DNS +UseCanonicalName DNS VirtualDocumentRootIP /usr/local/apache/vhosts/%1/%2/%3/%4/docs -VirtualScriptAliasIP /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin -+VirtualScriptAliasIP /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-binA request for @@ -238,9 +224,7 @@ VirtualScriptAliasIP /usr/local/apache/vhosts/%1/%2/%3/%4/cgi-bin a
-%directive, you can work around the problem in the following way:- VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0 -+VirtualDocumentRoot /usr/local/apache/vhosts/%2.0.%3.0A request for diff --git a/docs/manual/mod/mpm_common.html.en b/docs/manual/mod/mpm_common.html.en index 29ab934fb3..086b625c11 100644 --- a/docs/manual/mod/mpm_common.html.en +++ b/docs/manual/mod/mpm_common.html.en @@ -178,27 +178,21 @@ listens to
For example, to make the server accept connections on both port 80 and port 8000, use:
--Listen 80 -Listen 8000 -+Listen 80 +Listen 8000To make the server accept connections on two specified interfaces and port numbers, use
--Listen 192.170.2.1:80 -Listen 192.170.2.5:8000 -+Listen 192.170.2.1:80 +Listen 192.170.2.5:8000IPv6 addresses must be surrounded in square brackets, as in the following example:
-- Listen [2001:db8::a00:20ff:fea7:ccea]:80 -+Listen [2001:db8::a00:20ff:fea7:ccea]:80The optional protocol argument is not required for most @@ -211,9 +205,7 @@ Listen 192.170.2.5:8000
You only need to set the protocol if you are running on non-standard ports. For example, running an
-httpssite on port 8443:- Listen 192.170.2.1:8443 https -+Listen 192.170.2.1:8443 httpsError condition
@@ -436,9 +428,7 @@ of the daemon filename is not absolute then it is assumed to be relative to theDefaultRuntimeDir. --Example
- PidFile /var/run/apache.pid -+Example
PidFile /var/run/apache.pidIt is often useful to be able to send the server a signal, @@ -496,9 +486,7 @@ the child processes will be relative to the value of
-DefaultRuntimeDir.-Example
- ScoreBoardFile /var/run/apache_runtime_status -+Example
ScoreBoardFile /var/run/apache_runtime_statusFile-based shared memory is useful for third-party applications diff --git a/docs/manual/mod/worker.html.en b/docs/manual/mod/worker.html.en index a0e21974b8..50d31ec16a 100644 --- a/docs/manual/mod/worker.html.en +++ b/docs/manual/mod/worker.html.en @@ -142,14 +142,12 @@
A typical configuration of the process-thread controls in the
-workerMPM could look as follows:-ServerLimit 16 +ServerLimit 16 StartServers 2 MaxRequestWorkers 150 MinSpareThreads 25 MaxSpareThreads 75 -ThreadsPerChild 25 -+ThreadsPerChild 25While the parent process is usually started as
rootdiff --git a/docs/manual/platform/perf-hp.html.en b/docs/manual/platform/perf-hp.html.en index 5e26c7d8f0..ce783c75fa 100644 --- a/docs/manual/platform/perf-hp.html.en +++ b/docs/manual/platform/perf-hp.html.en @@ -26,13 +26,11 @@-Date: Wed, 05 Nov 1997 16:59:34 -0800 +Date: Wed, 05 Nov 1997 16:59:34 -0800 From: Rick Jones <raj@cup.hp.com> Reply-To: raj@cup.hp.com Organization: Network Performance -Subject: HP-UX tuning tips -+Subject: HP-UX tuning tipsHere are some tuning tips for HP-UX to add to the tuning page.
diff --git a/docs/manual/platform/perf-hp.html.ko.euc-kr b/docs/manual/platform/perf-hp.html.ko.euc-kr index 509a3b3130..a66348d4d2 100644 --- a/docs/manual/platform/perf-hp.html.ko.euc-kr +++ b/docs/manual/platform/perf-hp.html.ko.euc-kr @@ -28,13 +28,11 @@ ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼¸¦ Âü°íÇϼ¼¿ä.-Date: Wed, 05 Nov 1997 16:59:34 -0800 +Date: Wed, 05 Nov 1997 16:59:34 -0800 From: Rick Jones <raj@cup.hp.com> Reply-To: raj@cup.hp.com Organization: Network Performance -Subject: HP-UX tuning tips -+Subject: HP-UX tuning tipsÀÌ ±ÛÀº ¼º´ÉÇâ»ó ÆäÀÌÁö¿¡ Ãß°¡ÇÒ HP-UX ¼º´ÉÇâ»ó ÆÁÀÌ´Ù.
diff --git a/docs/manual/platform/win_compiling.html.ko.euc-kr b/docs/manual/platform/win_compiling.html.ko.euc-kr index 073808b6d5..a6d5c86244 100644 --- a/docs/manual/platform/win_compiling.html.ko.euc-kr +++ b/docs/manual/platform/win_compiling.html.ko.euc-kr @@ -179,11 +179,9 @@ ÀÖ´Ù. Windows NT¿¡¼release¿ÍdebugÄÄÆÄÀÏÇÏ´Â ¸í·É¾î´Â °¢°¢ ´ÙÀ½°ú °°´Ù: --nmake /f Makefile.win _apacher ++nmake /f Makefile.win _apachednmake /f Makefile.win _apacher -nmake /f Makefile.win _apached -µÎ ¸í·É¾î ¸ðµÎ ¾ÆÆÄÄ¡¸¦ ÄÄÆÄÀÏÇÑ´Ù. ÈÄÀÚ´Â °á°úÆÄÀÏ¿¡ µð¹ö±ë Á¤º¸¸¦ Æ÷ÇÔÇÏ¿© ¹ö±×¸¦ ã°í ¹®Á¦¸¦ ÃßÀûÇϱ⠽±°Ô @@ -323,8 +321,7 @@ nmake /f Makefile.win _apached
ÄÄÆÄÀÏÇÏ°í ¸ðµç ÆÄÀÏÀ» ¿øÇÏ´Â Æú´õ dir¿¡ ÀÚµ¿À¸·Î ¼³Ä¡ÇÏ·Á¸é ´ÙÀ½
-nmake¸í·É¾îÁß Çϳª¸¦ »ç¿ëÇÑ´Ù:diff --git a/docs/manual/sections.html.en b/docs/manual/sections.html.en index 0ef6ca070e..7a4cf56e05 100644 --- a/docs/manual/sections.html.en +++ b/docs/manual/sections.html.en @@ -62,11 +62,9 @@ with the following configuration, all requests will be redirected to another site only if the server is started using-nmake /f Makefile.win installr INSTDIR=dir +diff --git a/docs/manual/platform/windows.html.en b/docs/manual/platform/windows.html.en index 92004596b8..33dbb6cf2f 100644 --- a/docs/manual/platform/windows.html.en +++ b/docs/manual/platform/windows.html.en @@ -140,12 +140,10 @@ how it is accessed. If you wish to assure that only lowercase is used in URLs, you can use something like: -nmake /f Makefile.win installr INSTDIR=dir nmake /f Makefile.win installd INSTDIR=dir-RewriteEngine On +RewriteEngine On RewriteMap lowercase int:tolower RewriteCond %{REQUEST_URI} [A-Z] -RewriteRule (.*) ${lowercase:$1} [R,L] -+RewriteRule (.*) ${lowercase:$1} [R,L]When running, Apache needs write access only to the logs @@ -167,9 +165,7 @@ RewriteRule (.*) ${lowercase:$1} [R,L] module, use the following (in addition to the status-activating directives in
-access.conf):- LoadModule status_module modules/mod_status.so -+LoadModule status_module modules/mod_status.so-Example DocumentRoot with UNC path
- DocumentRoot //dochost/www/html/ -+-Example DocumentRoot with UNC path
DocumentRoot //dochost/www/html/Example DocumentRoot with IP address in UNC path
- DocumentRoot //192.168.1.50/docs/ -+-Example DocumentRoot with IP address in UNC path
DocumentRoot //192.168.1.50/docs/-Example Alias and corresponding Directory with UNC path
-Alias /images/ //imagehost/www/images/ +Example Alias and corresponding Directory with UNC path
Alias /images/ //imagehost/www/images/ <Directory //imagehost/www/images/> #... -<Directory> -+<Directory>When running Apache httpd as a service, you must create a diff --git a/docs/manual/programs/log_server_status.html.en b/docs/manual/programs/log_server_status.html.en index 3840d3ca51..dab8b78595 100644 --- a/docs/manual/programs/log_server_status.html.en +++ b/docs/manual/programs/log_server_status.html.en @@ -38,12 +38,10 @@
The script contains the following section.
--my $wherelog = "/usr/local/apache2/logs/"; # Logs will be like "/usr/local/apache2/logs/19960312" +my $wherelog = "/usr/local/apache2/logs/"; # Logs will be like "/usr/local/apache2/logs/19960312" my $server = "localhost"; # Name of server, could be "www.foo.com" my $port = "80"; # Port on server -my $request = "/server-status/?auto"; # Request to send -+my $request = "/server-status/?auto"; # Request to sendYou'll need to ensure that these variables have the correct values, diff --git a/docs/manual/programs/split-logfile.html.en b/docs/manual/programs/split-logfile.html.en index a166e4b49d..7df5d7ca6a 100644 --- a/docs/manual/programs/split-logfile.html.en +++ b/docs/manual/programs/split-logfile.html.en @@ -36,10 +36,8 @@
Create a log file with virtual host information in it:
--LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_plus_vhost -CustomLog logs/access_log combined_plus_vhost -+LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined_plus_vhost +CustomLog logs/access_log combined_plus_vhostLog files will be created, in the directory where you run the diff --git a/docs/manual/rewrite/access.html.en b/docs/manual/rewrite/access.html.en index 438568daab..f61bf6cb34 100644 --- a/docs/manual/rewrite/access.html.en +++ b/docs/manual/rewrite/access.html.en @@ -78,31 +78,25 @@ configuration.
-RewriteCond %{HTTP_REFERER} !^$ +RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !www.example.com [NC] -RewriteRule \.(gif|jpg|png)$ - [F,NC] -+RewriteRule \.(gif|jpg|png)$ - [F,NC]In this second example, instead of failing the request, we display an alternate image instead.
--RewriteCond %{HTTP_REFERER} !^$ +RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !www.example.com [NC] -RewriteRule \.(gif|jpg|png)$ /images/go-away.png [R,NC] -+RewriteRule \.(gif|jpg|png)$ /images/go-away.png [R,NC]In the third example, we redirect the request to an image on some other site.
--RewriteCond %{HTTP_REFERER} !^$ +RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !www.example.com [NC] -RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC] -+RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC]Of these techniques, the last two tend to be the most effective @@ -118,12 +112,10 @@ RewriteRule \.(gif|jpg|png)$ http://other.example.com/image.gif [R,NC] than redirecting that request elsewhere, this can be accomplished without the use of mod_rewrite:
--SetEnvIf Referer example\.com localreferer +@@ -167,11 +159,9 @@ SetEnvIf Referer example\.com localreferer range, if you are trying to block that user agent only from the particular source. -SetEnvIf Referer example\.com localreferer <FilesMatch \.(jpg|png|gif)$> Require env localreferer -</FilesMatch> -+</FilesMatch>-RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot +@@ -182,15 +172,13 @@ RewriteRule ^/secret/files/ - [F] Rather than using mod_rewrite for this, you can accomplish the same end using alternate means, as illustrated here: -RewriteCond %{HTTP_USER_AGENT} ^NameOfBadRobot RewriteCond %{REMOTE_ADDR} =123\.45\.67\.[8-9] -RewriteRule ^/secret/files/ - [F] -+RewriteRule ^/secret/files/ - [F]-SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway +SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway <Location /secret/files> <RequireAll> Require all granted Require not env goaway </RequireAll> -</Location> -+</Location>As noted above, this technique is trivial to circumvent, by simply @@ -221,13 +209,11 @@ SetEnvIfNoCase User-Agent ^NameOfBadRobot goaway
Solution: - -RewriteEngine on +RewriteEngine on RewriteMap hosts-deny txt:/path/to/hosts.deny RewriteCond ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND [OR] RewriteCond ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND -RewriteRule ^ - [F] -+RewriteRule ^ - [F]-
@@ -276,8 +262,7 @@ bsdti1.sdm.de -
The following ruleset uses a map file to associate each Referer with a redirection target.
--RewriteMap deflector txt:/path/to/deflector.map +RewriteMap deflector txt:/path/to/deflector.map RewriteCond %{HTTP_REFERER} !="" RewriteCond ${deflector:%{HTTP_REFERER}} =- @@ -285,23 +270,20 @@ RewriteRule ^ %{HTTP_REFERER} [R,L] RewriteCond %{HTTP_REFERER} !="" RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND -RewriteRule ^ ${deflector:%{HTTP_REFERER}} [R,L] -+RewriteRule ^ ${deflector:%{HTTP_REFERER}} [R,L]The map file lists redirection targets for each referer, or, if we just wish to redirect back to where they came from, a "-" is placed in the map:
--##diff --git a/docs/manual/rewrite/advanced.html.en b/docs/manual/rewrite/advanced.html.en index 9920e8dd62..16a20dad52 100644 --- a/docs/manual/rewrite/advanced.html.en +++ b/docs/manual/rewrite/advanced.html.en @@ -91,11 +91,9 @@ http://physical_host_of_user1/u/user/anypath files assuming that server0 is a default server which will be used if a user has no entry in the map:
+##+http://badguys.example.com/bad/index3.html http://somewhere.example.com/
## deflector.map
##
http://badguys.example.com/bad/index.html -
http://badguys.example.com/bad/index2.html -
-http://badguys.example.com/bad/index3.html http://somewhere.example.com/ --RewriteEngine on +@@ -125,11 +123,9 @@ RewriteRule ^/u/([^/]+)/?(.*) http://${users-to-hosts:$1|server0}/u/$1/$2RewriteEngine on RewriteMap users-to-hosts txt:/path/to/map.users-to-hosts -RewriteRule ^/u/([^/]+)/?(.*) http://${users-to-hosts:$1|server0}/u/$1/$2 -+RewriteRule ^/u/([^/]+)/?(.*) http://${users-to-hosts:$1|server0}/u/$1/$2This is done via the following ruleset: - @@ -376,10 +366,8 @@ exit(0);-# This example is valid in per-directory context only +# This example is valid in per-directory context only RewriteCond %{REQUEST_URI} !-U -RewriteRule ^(.+)\.html$ /regenerate_page.cgi [PT,L] -+RewriteRule ^(.+)\.html$ /regenerate_page.cgi [PT,L]The
-Uoperator determines whether the test string @@ -167,11 +163,9 @@ RewriteRule ^(.+)\.html$ /regenerate_page.cgi [PT,L]We'll use
-RewriteMapand a list of servers to accomplish this.-RewriteEngine on +RewriteEngine on RewriteMap lb rnd:/path/to/serverlist.txt -RewriteRule ^/(.*) http://${lb:servers}/$1 [P,L] -+RewriteRule ^/(.*) http://${lb:servers}/$1 [P,L]@@ -223,9 +217,7 @@ featureful than anything you can cobble together using mod_rewrite. URL causes the 'page' to be refreshed every time it is updated on the filesystem. -
serverlist.txtwill contain a list of the servers:-RewriteRule ^(/[uge]/[^/]+/?.*):refresh /internal/cgi/apache/nph-refresh?f=$1 -+RewriteRule ^(/[uge]/[^/]+/?.*):refresh /internal/cgi/apache/nph-refresh?f=$1Now when we reference the URL
@@ -244,8 +236,7 @@ RewriteRule ^(/[uge]/[^/]+/?.*):refresh /internal/cgi/apache/nph-refresh?f=$1 one would usually say "left as an exercise to the reader" ;-) I will provide this, too. --#!/sw/bin/perl +#!/sw/bin/perl ## ## nph-refresh -- NPH/CGI script for auto refreshing pages ## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. @@ -345,8 +336,7 @@ for ( $n = 0 ; $n & lt ; $QS_n ; $n++ ) { exit(0); -##EOF## -+##EOF##We use the following ruleset to expand the tilde URLs into the above layout.
--RewriteEngine on -RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) /home/$2/$1/public_html$3 -+RewriteEngine on +RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) /home/$2/$1/public_html$3@@ -436,13 +424,11 @@ RewriteRule ^/~(([a-z])[a-z0-9]+)(.*) /home/$2>STRING and=STRINGwe can do time-dependent redirects: --RewriteEngine on +RewriteEngine on RewriteCond %{TIME_HOUR}%{TIME_MIN} >0700 RewriteCond %{TIME_HOUR}%{TIME_MIN} <1900 RewriteRule ^foo\.html$ foo.day.html [L] -RewriteRule ^foo\.html$ foo.night.html -+RewriteRule ^foo\.html$ foo.night.htmlThis provides the content of
foo.day.html@@ -482,18 +468,14 @@ RewriteRule ^foo\.html$ foo.night.htmlUse the [E] flag to set an environment variable.
--RewriteEngine on -RewriteRule ^/horse/(.*) /pony/$1 [E=rewritten:1] -+RewriteEngine on +RewriteRule ^/horse/(.*) /pony/$1 [E=rewritten:1]Later in your ruleset you might check for this environment variable using a RewriteCond:
--RewriteCond %{ENV:rewritten} =1 -+RewriteCond %{ENV:rewritten} =1Note that environment variables do not survive an external diff --git a/docs/manual/rewrite/avoid.html.en b/docs/manual/rewrite/avoid.html.en index a7eec66f27..031e0424e2 100644 --- a/docs/manual/rewrite/avoid.html.en +++ b/docs/manual/rewrite/avoid.html.en @@ -89,8 +89,7 @@ and
/one/three/four.html.To redirect
-httpURLs tohttps, do the following:-<VirtualHost *:80> +<VirtualHost *:80> ServerName www.example.com Redirect / https://www.example.com/ </VirtualHost > @@ -98,8 +97,7 @@ following: <VirtualHost *:443> ServerName www.example.com # ... SSL configuration goes here -</VirtualHost > -+</VirtualHost >The use of
RewriteRuleto perform this task may be @@ -165,27 +163,21 @@ seems like the right approach.-
RewriteRuleprovides the [P] flag to pass rewritten URIs throughmod_proxy.-RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P] -+RewriteRule ^/?images(.*) http://imageserver.local/images$1 [P]However, in many cases, when there is no actual pattern matching needed, as in the example shown above, the
-ProxyPassdirective is a better choice. The example here could be rendered as:-ProxyPass /images/ http://imageserver.local/images/ -+ProxyPass /images/ http://imageserver.local/images/Note that whether you use
-RewriteRuleorProxyPass, you'll still need to use theProxyPassReversedirective to catch redirects issued from the back-end server:-ProxyPassReverse /images/ http://imageserver.local/images/ -+ProxyPassReverse /images/ http://imageserver.local/images/You may need to use
-RewriteRuleinstead when there are @@ -208,11 +200,9 @@ variable or request header. This can be done more efficiently using the hostname, such aswww.example.cominstead ofexample.com. This can be done using the<If>directive, as shown here:-<If "req('Host') != 'www.example.com'"> +<If "req('Host') != 'www.example.com'"> Redirect / http://www.example.com/ -</If> -+</If>This technique can be used to take actions based on any request diff --git a/docs/manual/rewrite/flags.html.en b/docs/manual/rewrite/flags.html.en index 0465a2dd31..0dc465b22d 100644 --- a/docs/manual/rewrite/flags.html.en +++ b/docs/manual/rewrite/flags.html.en @@ -173,10 +173,8 @@ browsers that support this feature.
Consider this example:
--RewriteEngine On -RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.com:1440:/] -+RewriteEngine On +RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.com:1440:/]In the example give, the rule doesn't rewrite the request. @@ -262,10 +260,8 @@ value of '1' if the requested URI is an image file. Then, that environment variable is used to exclude those requests from the access log.
--RewriteRule \.(png|gif|jpg)$ - [E=image:1] -CustomLog logs/access_log combined env=!image -+RewriteRule \.(png|gif|jpg)$ - [E=image:1] +CustomLog logs/access_log combined env=!imageNote that this same effect can be obtained using
-SetEnvIf. This technique is offered as @@ -336,9 +332,7 @@ For example, the following snippet used in per-server context allows.phpfiles to be displayed bymod_phpif they are requested with the.phpsextension:-RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source] -+RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source]The regular expression above -
argument to^(/source/.+\.php)s$- will @@ -386,11 +380,9 @@ redirects.index.php, however, theRewriteCondensures that if the request is already forindex.php, theRewriteRulewill be skipped. --RewriteBase / +RewriteBase / RewriteCond %{REQUEST_URI} !=/index.php -RewriteRule ^(.*) /index.php?req=$1 [L,PT] -+RewriteRule ^(.*) /index.php?req=$1 [L,PT]@@ -416,12 +408,10 @@ pattern still matches (i.e., while the URI still contains an@@ -545,10 +535,8 @@ use the [PT] flag to ensure that theIn 2.5.0 and later, this module returns an error after 10,000 iterations to protect against unintended looping. An alternative maximum number of iterations can be specified by adding to the N flag.
--# Be willing to replace 1 character in each pass of the loop +# Be willing to replace 1 character in each pass of the loop RewriteRule (.+)[><;]$ $1 [N=32000] # ... or, give up if after 10 loops -RewriteRule (.+)[><;]$ $1 [N=10] -+RewriteRule (.+)[><;]$ $1 [N=10]Aliasis evaluated. --Alias /icons /usr/local/apache/icons -RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT] -+Alias /icons /usr/local/apache/icons +RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT]@@ -655,16 +643,14 @@ example, we only want to run the
-# Is the request for a non-existent file? +# Is the request for a non-existent file? RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # If so, skip these two RewriteRules RewriteRule .? - [S=2] RewriteRule (.*\.gif) images.php?$1 -RewriteRule (.*\.html) docs.php?$1 -+RewriteRule (.*\.html) docs.php?$1This technique is useful because a
-RewriteCondonly applies to the @@ -675,8 +661,7 @@ negate those conditions and add aRewriteRulewith a [Skip] flag. Y use this to make pseudo if-then-else constructs: The last rule of the then-clause becomesskip=N, where N is the number of rules in the else-clause:-# Does the file exist? +# Does the file exist? RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Create an if-then-else construct by skipping 3 lines if we meant to go to the "else" stanza. @@ -689,8 +674,7 @@ RewriteRule .? - [S=3] RewriteRule .? - [S=1] # ELSE... RewriteRule (.*) 404.php?file=$1 -# END -+# ENDIt is probably easier to accomplish this kind of configuration using @@ -705,20 +689,16 @@ sent. This has the same effect as the
--# Serve .pl files as plain text -RewriteRule \.pl$ - [T=text/plain] - +# Serve .pl files as plain text +RewriteRule \.pl$ - [T=text/plain]Or, perhaps, if you have a camera that produces jpeg images without file extensions, you could force those images to be served with the correct MIME type by virtue of their file names:
--# Files with 'IMG' in the name are jpg images. -RewriteRule IMG - [T=image/jpg] -+# Files with 'IMG' in the name are jpg images. +RewriteRule IMG - [T=image/jpg]Please note that this is a trivial example, and could be better done diff --git a/docs/manual/rewrite/flags.html.fr b/docs/manual/rewrite/flags.html.fr index e3fd9313bc..f1d9b3cc4c 100644 --- a/docs/manual/rewrite/flags.html.fr +++ b/docs/manual/rewrite/flags.html.fr @@ -187,10 +187,8 @@ fonctionnalit
Voici un exemple :
--RewriteEngine On -RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.org:1440:/] -+RewriteEngine On +RewriteRule ^/index\.html - [CO=frontdoor:yes:.example.org:1440:/]Dans l'exemple ci-dessus, la règle ne réécrit @@ -358,9 +356,7 @@ faire en sorte que les fichiers
-.phpsoient affichés parmod_phpdans le cas où ils font l'objet d'une requête avec l'extension.phps:-RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source] -+RewriteRule ^(/source/.+\.php)s$ $1 [H=application/x-httpd-php-source]@@ -414,11 +410,9 @@ de requ directiveRewriteCondpermet de s'assurer que si la requête concerne déjàindex.php, la directiveRewriteRulesera sautée.-RewriteBase / +RewriteBase / RewriteCond %{REQUEST_URI} !=/index.php -RewriteRule ^(.*) /index.php?req=$1 [L,PT] -+RewriteRule ^(.*) /index.php?req=$1 [L,PT]@@ -448,12 +442,10 @@ un@@ -585,10 +577,8 @@ Si par exemple, vous avez unB).A partir de la version 2.5.0, ce module renvoie une erreur après 10000 itérations afin d'éviter les boucles infinies. Ce nombre maximum d'itération peut être modifié via le drapeau N.
--# On veut remplacer 1 caractère à chaque itération de la boucle +# On veut remplacer 1 caractère à chaque itération de la boucle RewriteRule (.+)[><;]$ $1 [N=32000] # ... ou s'arrêter après 10 itérations -RewriteRule (.+)[><;]$ $1 [N=10] -+RewriteRule (.+)[><;]$ $1 [N=10]Aliassera bien évalué. --Alias /icons /usr/local/apache/icons -RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT] -+Alias /icons /usr/local/apache/icons +RewriteRule /pics/(.+)\.jpg$ /icons/$1.gif [PT]@@ -701,16 +691,14 @@ Ceci peut s'interpr
-gotodans votre jeu de règles de réécriture. Dans l'exemple suivant, nous ne voulons exécuter la règleRewriteRuleque si l'URI demandé ne correspond pas à un fichier existant.-# La requête concerne-t-elle un fichier qui n'existe pas ? +@@ -724,8 +712,7 @@ conditions et ajouter une# La requête concerne-t-elle un fichier qui n'existe pas ? RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Si c'est la cas, on saute les deux règles de réécriture suivantes RewriteRule .? - [S=2] RewriteRule (.*\.gif) images.php?$1 -RewriteRule (.*\.html) docs.php?$1 -+RewriteRule (.*\.html) docs.php?$1RewriteRuleavec le drapeau [Skip]. Cette d'élaborer des pseudo-constructions if-then-else : la dernière règle du bloc then contiendraskip=N, où N est le nombre de règles contenues dans le bloc else : --# Est-ce que le fichier existe ? +# Est-ce que le fichier existe ? RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Create an if-then-else construct by skipping 3 lines if we meant to go to the "else" stanza. @@ -738,8 +725,7 @@ RewriteRule (.*\.gif) images.php?$1 RewriteRule .? - [S=1] # ELSE... RewriteRule (.*) 404.php?file=$1 -# END -+# ENDIl est probablement plus aisé de définir ce genre de configuration @@ -755,20 +741,16 @@ identique du code source Perl en tant que plein texte, s'il est requis d'une certaine manière :
--# Sert les fichier .pl en tant que plein texte -RewriteRule \.pl$ - [T=text/plain] -+# Sert les fichier .pl en tant que plein texte +RewriteRule \.pl$ - [T=text/plain]Ou encore, si vous possédez une caméra qui produit des fichiers images jpeg sans extension, vous pouvez forcer le renvoi de ces images avec le type MIME correct en se basant sur le nom du fichier :
--# Les fichiers dont le nom contient 'IMG' sont des images jpg. -RewriteRule IMG - [T=image/jpg] -+# Les fichiers dont le nom contient 'IMG' sont des images jpg. +RewriteRule IMG - [T=image/jpg]Notez cependant qu'il s'agit d'un exemple trivial, et que le problème diff --git a/docs/manual/rewrite/intro.html.en b/docs/manual/rewrite/intro.html.en index 42f3bf32c6..ff202a4e9f 100644 --- a/docs/manual/rewrite/intro.html.en +++ b/docs/manual/rewrite/intro.html.en @@ -189,9 +189,7 @@ value.
- A full filesystem path to a resource
- -
-RewriteRule ^/games /usr/local/games/web -+RewriteRule ^/games /usr/local/games/webThis maps a request to an arbitrary location on your filesystem, much like the
@@ -199,9 +197,7 @@ like theAliasdirective.Alias- A web-path to a resource
- -
-RewriteRule ^/foo$ /bar -+RewriteRule ^/foo$ /barIf
DocumentRootis set to/usr/local/apache2/htdocs, then this directive would @@ -211,9 +207,7 @@ path/usr/local/apache2/htdocs/bar.- An absolute URL
- -
@@ -222,9 +216,7 @@ RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R]-RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R] -+RewriteRule ^/product/view$ http://site2.example.com/seeproduct.html [R]This tells the client to make a new request for the specified URL.
The Substitution can also contain back-references to parts of the incoming URL-path matched by the Pattern. Consider the following:
--RewriteRule ^/product/(.*)/view$ /var/web/productdb/$1 -+RewriteRule ^/product/(.*)/view$ /var/web/productdb/$1The variable
-$1will be replaced with whatever text was matched by the expression inside the parenthesis in @@ -246,9 +238,7 @@ application of one or more flags to the end of the rule. For example, the matching behavior of a rule can be made case-insensitive by the application of the[NC]flag:-RewriteRule ^puppy.html smalldog.html [NC] -+RewriteRule ^puppy.html smalldog.html [NC]For more details on the available flags, their meanings, and @@ -273,10 +263,8 @@ argument is a list of flags that modify how the match is evaluated.
For example, to send all requests from a particular IP range to a different server, you could use:
--RewriteCond %{REMOTE_ADDR} ^10\.2\. -RewriteRule (.*) http://intranet.example.com$1 -+RewriteCond %{REMOTE_ADDR} ^10\.2\. +RewriteRule (.*) http://intranet.example.com$1When more than @@ -286,11 +274,9 @@ the
-Rewrit applied. For example, to deny requests that contain the word "hack" in their query string, unless they also contain a cookie containing the word "go", you could use:-RewriteCond %{QUERY_STRING} hack +RewriteCond %{QUERY_STRING} hack RewriteCond %{HTTP_COOKIE} !go -RewriteRule . - [F] -+RewriteRule . - [F]Notice that the exclamation mark specifies a negative match, so the rule is only applied if the cookie does not contain "go".
@@ -301,10 +287,8 @@ theRewrit variables%1,%2, etc. For example, this will direct the request to a different directory depending on the hostname used to access the site: --RewriteCond %{HTTP_HOST} (.*) -RewriteRule ^/(.*) /sites/%1/$1 -+RewriteCond %{HTTP_HOST} (.*) +RewriteRule ^/(.*) /sites/%1/$1If the request was for
http://example.com/foo/bar, then%1would containexample.comdiff --git a/docs/manual/rewrite/intro.html.fr b/docs/manual/rewrite/intro.html.fr index eca2e6a6ea..d814f38c80 100644 --- a/docs/manual/rewrite/intro.html.fr +++ b/docs/manual/rewrite/intro.html.fr @@ -213,9 +213,7 @@ trois types :
- Un chemin complet du système de fichiers vers une ressource
- -
-RewriteRule ^/jeux /usr/local/jeux/web -+RewriteRule ^/jeux /usr/local/jeux/webCeci peut faire correspondre une requête à toute localisation voulue de votre système de fichiers, un peu comme la directive
@@ -223,9 +221,7 @@ votre systAlias.- Un chemin web vers une ressource
- -
-RewriteRule ^/foo$ /bar -+RewriteRule ^/foo$ /barSi la directive
DocumentRoota pour valeur/usr/local/apache2/htdocs, cette règle va faire @@ -235,9 +231,7 @@ chemin/usr/local/apache2/htdocs/bar.- Une URL absolue
- -
diff --git a/docs/manual/rewrite/remapping.html.en b/docs/manual/rewrite/remapping.html.en index bff854444e..de84ba80ee 100644 --- a/docs/manual/rewrite/remapping.html.en +++ b/docs/manual/rewrite/remapping.html.en @@ -74,10 +74,8 @@ configuration.-RewriteRule ^/produits/vues$ http://site2.example.com/voirproduits.html [R] -+RewriteRule ^/produits/vues$ http://site2.example.com/voirproduits.html [R]Ceci informe le client qu'il doit effectuer une nouvelle requête vers l'URL spécifiée.
@@ -247,9 +241,7 @@ l'URL spLa chaîne de Substitution peut aussi contenir des références arrières vers des parties du chemin d'URL entrant correspondant au Modèle. Considérons ce qui suit :
--RewriteRule ^/produits/(.*)/view$ /var/web/produitsdb/$1 -+RewriteRule ^/produits/(.*)/view$ /var/web/produitsdb/$1La variable
-$1sera remplacée par tout texte correspondant à l'expression située entre les parenthèses dans le @@ -270,9 +262,7 @@ pr conditions de correspondance d'une règle peuvent être rendues insensibles à la casse par la présence du drapeau[NC]:-RewriteRule ^puppy.html petitchien.html [NC] -+RewriteRule ^puppy.html petitchien.html [NC]Pour une liste des drapeaux disponibles, leurs significations, et des @@ -299,10 +289,8 @@ correspondance est
Par exemple, pour renvoyer toutes les requêtes en provenance d'une certaine tranche d'adresses IP vers un autre serveur, vous pouvez utiliser :
--RewriteCond %{REMOTE_ADDR} ^10\.2\. -RewriteRule (.*) http://intranet.example.com$1 -+RewriteCond %{REMOTE_ADDR} ^10\.2\. +RewriteRule (.*) http://intranet.example.com$1Si vous spécifiez plus d'une directive
-RewriteCond, ces directives @@ -310,11 +298,9 @@ doivent toutes pour interdire les requêtes qui contiennent le mot "hack" dans la chaîne de requête, sauf si elles contiennent aussi un cookie contenant le mot "go", vous pouvez utiliser :-RewriteCond %{QUERY_STRING} hack +RewriteCond %{QUERY_STRING} hack RewriteCond %{HTTP_COOKIE} !go -RewriteRule . - [F] -+RewriteRule . - [F]Notez que le point d'exclamation indique une correspondance négative ; ainsi, la règle n'est appliquée que si le cookie ne contient pas "go"
@@ -326,10 +312,8 @@ de la r les variables%1,%2, etc... Par exemple, ce qui suit va diriger la requête vers un répertoire différent en fonction du nom d'hôte utilisé pour accéder au site : --RewriteCond %{HTTP_HOST} (.*) -RewriteRule ^/(.*) /sites/%1/$1 -+RewriteCond %{HTTP_HOST} (.*) +RewriteRule ^/(.*) /sites/%1/$1Si la requête concernait
http://example.com/foo/bar, alors%1contiendraitexample.comet diff --git a/docs/manual/rewrite/proxy.html.en b/docs/manual/rewrite/proxy.html.en index 9a511244df..a64f2e50bb 100644 --- a/docs/manual/rewrite/proxy.html.en +++ b/docs/manual/rewrite/proxy.html.en @@ -56,12 +56,10 @@ A number of recipes are provided that describe common scenarios.To simply map a URL to another server, we use the [P] flag, as follows:
--RewriteEngine on +RewriteEngine on RewriteBase /products/ RewriteRule ^widget/(.*)$ http://product.example.com/widget/$1 [P] -ProxyPassReverse /products/widget/ http://product.example.com/widget/ -+ProxyPassReverse /products/widget/ http://product.example.com/widget/In the second example, we proxy the request only if we can't find @@ -69,12 +67,10 @@ ProxyPassReverse /products/widget/ http://product.example.com/widget/ from one server to another, and you're not sure if all the content has been migrated yet.
--RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*) http://old.example.com/$1 [P] -ProxyPassReverse / http://old.example.com/ -+ProxyPassReverse / http://old.example.com/We rewrite the old URL to the new one internally via the following rule:
--RewriteEngine on -RewriteRule ^/foo\.html$ /bar.html [PT] -+RewriteEngine on +RewriteRule ^/foo\.html$ /bar.html [PT]@@ -106,10 +104,8 @@ RewriteRule ^/foo\.html$ /bar.html [PT]We force a HTTP redirect to the new URL which leads to a change of the browsers and thus the users view:
--RewriteEngine on -RewriteRule ^/foo\.html$ bar.html [R] -+RewriteEngine on +RewriteRule ^/foo\.html$ bar.html [R]@@ -150,18 +146,15 @@ RewriteRule ^/foo\.html$ bar.html [#With mod_rewrite RewriteEngine on -RewriteRule ^/docs/(.+) http://new.example.com/docs/$1 [R,L] - +RewriteRule ^/docs/(.+) http://new.example.com/docs/$1 [R,L] #With RedirectMatch -RedirectMatch ^/docs/(.*) http://new.example.com/docs/$1 -+RedirectMatch ^/docs/(.*) http://new.example.com/docs/$1#With Redirect -Redirect /docs/ http://new.example.com/docs/ -+Redirect /docs/ http://new.example.com/docs/ @@ -192,11 +185,9 @@ Redirect /docs/ http://new.example.com/docs/ internally leads to the invocation of/~quux/foo.cgi. --RewriteEngine on +@@ -224,8 +215,7 @@ RewriteRule ^foo\.html$ foo.cgi [H=cgi-script] existence of the new extension. If it exists, we take that name, else we rewrite the URL to its original state. -RewriteEngine on RewriteBase /~quux/ -RewriteRule ^foo\.html$ foo.cgi [H=cgi-script] -+RewriteRule ^foo\.html$ foo.cgi [H=cgi-script]-# backward compatibility ruleset for +@@ -284,8 +273,7 @@ but rather uses the# backward compatibility ruleset for # rewriting document.html to document.php # when and only when document.php exists <Directory /var/www/htdocs> @@ -235,8 +225,7 @@ RewriteRule ^foo\.html$ foo.cgi [H=cgi-script] RewriteCond $1.php -f RewriteCond $1.html !-f RewriteRule ^(.*).html$ $1.php -</Directory> -+</Directory>-<VirtualHost *:80> +<VirtualHost *:80> ServerName undesired.example.com ServerAlias example.com notthis.example.com @@ -294,29 +282,24 @@ hostname(s). <VirtualHost *:80> ServerName www.example.com -</VirtualHost> -+</VirtualHost>You can alternatively accomplish this using the
-<If>directive:-<If "%{HTTP_HOST} != 'www.example.com'"> +<If "%{HTTP_HOST} != 'www.example.com'"> Redirect / http://www.example.com/ -</If> -+</If>Or, for example, to redirect a portion of your site to HTTPS, you might do the following:
--<If "%{SERVER_PROTOCOL} != 'HTTPS'"> +<If "%{SERVER_PROTOCOL} != 'HTTPS'"> Redirect /admin/ https://www.example.com/admin/ -</If> -+</If>If, for whatever reason, you still want to use
you might use one of the recipes below.mod_rewrite@@ -324,20 +307,16 @@ might do the following:For sites running on a port other than 80:
--RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] +RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] RewriteCond %{HTTP_HOST} !^$ RewriteCond %{SERVER_PORT} !^80$ -RewriteRule ^/?(.*) http://www.example.com:%{SERVER_PORT}/$1 [L,R,NE] -+RewriteRule ^/?(.*) http://www.example.com:%{SERVER_PORT}/$1 [L,R,NE]And for a site running on port 80
--RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] +RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] RewriteCond %{HTTP_HOST} !^$ -RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE] -+RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE]@@ -347,11 +326,9 @@ RewriteRule ^/?(.*) http://www.example.com/$1 [L,R,NE] example.com, you could use the following recipe:
--RewriteCond %{HTTP_HOST} !^www\. [NC] +RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteCond %{HTTP_HOST} !^$ -RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE] -+RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE]These rulesets will work either in your main server configuration @@ -382,8 +359,7 @@ RewriteRule ^/?(.*) http://www.%{HTTP_HOST}/$1 [L,R,NE] resource, and, if not finding it in either place, will attempt to just serve it out of the location requested.
--RewriteEngine on +@@ -427,13 +402,11 @@ RewriteRule ^ - [PT]RewriteEngine on # first try to find it in dir1/... # ...and if found stop and be happy: @@ -397,8 +373,7 @@ RewriteRule ^(.+) %{DOCUMENT_ROOT}/dir2/$1 [L] # else go on for other Alias or ScriptAlias directives, # etc. -RewriteRule ^ - [PT] -+RewriteRule ^ - [PT]We'll use a
-RewriteMapdirective to build a list of servers that we wish to use.-HostnameLookups on +HostnameLookups on RewriteEngine on RewriteMap multiplex txt:/path/to/map.mirrors RewriteCond %{REMOTE_HOST} ([a-z]+)$ [NC] -RewriteRule ^/(.*)$ ${multiplex:%1|http://www.example.com/}$1 [R,L] -+RewriteRule ^/(.*)$ ${multiplex:%1|http://www.example.com/}$1 [R,L]-
@@ -488,16 +461,14 @@ com http://www.example.com/
All other browsers receive pagefoo.32.html. This is done with the following ruleset:-RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.* +@@ -538,7 +509,7 @@ RewriteRule ^foo\.html$ foo.32.html [L This should really be accomplished with Redirect or RedirectMatch directives: -RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.* RewriteRule ^foo\.html$ foo.NS.html [L] RewriteCond %{HTTP_USER_AGENT} ^Lynx/ [OR] RewriteCond %{HTTP_USER_AGENT} ^Mozilla/[12] RewriteRule ^foo\.html$ foo.20.html [L] -RewriteRule ^foo\.html$ foo.32.html [L] -+RewriteRule ^foo\.html$ foo.32.html [L]RedirectMatch ^/(puppies|canines)/(.*) /dogs/$2+RedirectMatch ^/(puppies|canines)/(.*) /dogs/$2@@ -568,10 +539,8 @@ using the following ruleset:/about/: --RewriteEngine on -RewriteRule ^/$ /about/ [R] -+RewriteEngine on +RewriteRule ^/$ /about/ [R]Note that this can also be handled using the
@@ -605,26 +574,22 @@ that should go to an existing resource such as an image, or a css file.RedirectMatchdirective:As of version 2.2.16, you should use the
-FallbackResourcedirective for this:-<Directory /var/www/my_blog> +<Directory /var/www/my_blog> FallbackResource index.php -</Directory> -+</Directory>However, in earlier versions of Apache, or if your needs are more complicated than this, you can use a variation of the following rewrite set to accomplish the same thing:
--<Directory /var/www/my_blog> +<Directory /var/www/my_blog> RewriteBase /my_blog RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-f RewriteCond /var/www/my_blog/%{REQUEST_FILENAME} !-d RewriteRule ^ index.php [PT] -</Directory> -+</Directory>If, on the other hand, you wish to pass the requested URI as a query diff --git a/docs/manual/rewrite/rewritemap.html.en b/docs/manual/rewrite/rewritemap.html.en index 56d63f94b1..0a3fe4a4ca 100644 --- a/docs/manual/rewrite/rewritemap.html.en +++ b/docs/manual/rewrite/rewritemap.html.en @@ -146,11 +146,8 @@ may be used, and give examples of each.
Redirect a URI to an all-lowercase version of itself
-- -RewriteMap lc int:tolower -RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R] -+RewriteMap lc int:tolower +RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R]@@ -187,10 +184,8 @@ RewriteRule (.*?[A-Z]+.*) ${lc:$1} [R] product IDs for easier-to-remember URLs, using the following recipe:Product to ID configuration
--RewriteMap product2id txt:/etc/apache2/productmap.txt -RewriteRule ^/product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT] -+RewriteMap product2id txt:/etc/apache2/productmap.txt +RewriteRule ^/product/(.*) /prods.php?id=${product2id:$1|NOTFOUND} [PT]We assume here that the
prods.phpscript knows what @@ -260,12 +255,10 @@ static www1|www2|www3|www4
dynamic www5|www6Configuration directives
--RewriteMap servers rnd:/path/to/file/map.txt +RewriteMap servers rnd:/path/to/file/map.txt RewriteRule ^/(.*\.(png|gif|jpg)) http://${servers:static}/$1 [NC,P,L] -RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L] -+RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]So, when an image is requested and the first of these rules is @@ -297,9 +290,7 @@ static www1|www1|www2|www3|www4
You may optionally specify a particular dbm type:
--RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbm -+RewriteMap examplemap dbm=sdbm:/etc/apache/mapfile.dbmThe type can be sdbm, gdbm, ndbm or db. @@ -318,9 +309,7 @@ $ httxt2dbm -i mapfile.txt -o mapfile.map
You can then reference the resulting file in your
-RewriteMapdirective:-RewriteMap mapname dbm:/etc/apache/mapfile.map -+RewriteMap mapname dbm:/etc/apache/mapfile.map@@ -371,22 +360,17 @@ by many requests. underscores in a request URI.@@ -177,8 +173,7 @@ customer-N.example.com /www/customers/NRewrite configuration
-- -RewriteMap d2u prg:/www/bin/dash2under.pl+
-RewriteRule - ${d2u:%{REQUEST_URI}} -RewriteMap d2u prg:/www/bin/dash2under.pl
+RewriteRule - ${d2u:%{REQUEST_URI}}dash2under.pl
-- #!/usr/bin/perl +#!/usr/bin/perl $| = 1; # Turn off I/O buffering while (<STDIN>) { s/-/_/g; # Replace dashes with underscores print $_; - } -+ }Caution!
@@ -429,9 +413,7 @@ this process, or if the script itself is very slow.If a query returns more than one row, a random row from the result set is used.
-diff --git a/docs/manual/rewrite/vhosts.html.en b/docs/manual/rewrite/vhosts.html.en index 26b4616859..c0f687a7f5 100644 --- a/docs/manual/rewrite/vhosts.html.en +++ b/docs/manual/rewrite/vhosts.html.en @@ -65,14 +65,12 @@ mod_rewrite document.Example
-RewriteMap myquery "fastdbd:SELECT destination FROM rewrite WHERE source = %s" -+Example
RewriteMap myquery "fastdbd:SELECT destination FROM rewrite WHERE source = %s"- -RewriteEngine on +RewriteEngine on RewriteMap lowercase int:tolower RewriteCond ${lowercase:%{HTTP_HOST}} ^www\.([^.]+)\.example\.com$ -RewriteRule ^(.*) /home/%1/www$1 -+RewriteRule ^(.*) /home/%1/www$1Discussion @@ -123,8 +121,7 @@ dynamic content, and Alias resolution. anyScriptAliasdirectives, we must havemod_rewriteexplicitly enact those mappings. --# get the server name from the Host: header +# get the server name from the Host: header UseCanonicalName Off # splittable logs @@ -152,8 +149,7 @@ RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/docs/$1 ## and now deal with CGIs - we have to force a handler RewriteCond %{REQUEST_URI} ^/cgi-bin/ -RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1 [H=cgi-script] -+RewriteRule ^/(.*)$ /www/hosts/${lowercase:%{SERVER_NAME}}/cgi-bin/$1 [H=cgi-script]
The
-httpd.confshould contain the following:-RewriteEngine on +RewriteEngine on RewriteMap lowercase int:tolower @@ -196,8 +191,7 @@ RewriteRule ^/(.*)$ %1/docs/$1 RewriteCond %{REQUEST_URI} ^/cgi-bin/ RewriteCond ${lowercase:%{SERVER_NAME}} ^(.+)$ RewriteCond ${vhost:%1} ^(/.*)$ -RewriteRule ^/(.*)$ %1/cgi-bin/$1 [H=cgi-script] -+RewriteRule ^/(.*)$ %1/cgi-bin/$1 [H=cgi-script]httpd -DClosedForNow: --<IfDefine ClosedForNow> +<IfDefine ClosedForNow> Redirect / http://otherserver.example.com/ -</IfDefine> -+</IfDefine>The
<IfModule>@@ -83,11 +81,9 @@ about missing modules.In the following example, the
-MimeMagicFiledirective will be applied only ifmod_mime_magicis available.-<IfModule mod_mime_magic.c> +<IfModule mod_mime_magic.c> MimeMagicFile conf/magic -</IfModule> -+</IfModule>The
-<IfVersion>@@ -96,12 +92,10 @@ only be applied if a particular version of the server is executing. This module is designed for the use in test suites and large networks which have to deal with different httpd versions and different configurations.-<IfVersion >= 2.4> +<IfVersion >= 2.4> # this happens only in versions greater or # equal 2.4.0. -</IfVersion> -+</IfVersion>-
<IfDefine>, @@ -144,11 +138,9 @@ The same effect can be obtained using .htaccess fi following configuration, directory indexes will be enabled for the/var/web/dir1directory and all subdirectories.-<Directory /var/web/dir1> +<Directory /var/web/dir1> Options +Indexes -</Directory> -+</Directory>Directives enclosed in a
-<Files>section apply to any file with @@ -158,11 +150,9 @@ when placed in the main section of the configuration file, deny access to any file namedprivate.htmlregardless of where it is found.-<Files private.html> +<Files private.html> Require all denied -</Files> -+</Files>To address files found in a particular part of the filesystem, the @@ -175,13 +165,11 @@ access to
-/var/web/dir1/private.html, ofprivate.htmlfound under the/var/web/dir1/directory.-<Directory /var/web/dir1> +@@ -198,11 +186,9 @@ In particular, it will apply to requests for<Directory /var/web/dir1> <Files private.html> Require all denied </Files> -</Directory> -+</Directory>http://yoursite.example.com/private/dir/file.htmlas well as any other requests starting with the/privatestring. --<LocationMatch ^/private> +<LocationMatch ^/private> Require all denied -</LocationMatch> -+</LocationMatch>The
-<Location>@@ -212,11 +198,9 @@ URL to an internal Apache HTTP Server handler provided by< No file calledserver-statusneeds to exist in the filesystem.-<Location /server-status> +@@ -224,26 +208,20 @@ filesystem.<Location /server-status> SetHandler server-status -</Location> -+</Location>In order to have two overlapping URLs one has to consider the order in which certain sections or directives are evaluated. For
-<Location>this would be:-<Location /foo> +<Location /foo> </Location> <Location /foo/bar> -</Location> -+</Location>-
<Alias>es on the other hand, are mapped vice-versa:-Alias /foo/bar /srv/www/uncommon/bar -Alias /foo /srv/www/common/foo -+Alias /foo/bar /srv/www/uncommon/bar +Alias /foo /srv/www/common/fooThe same is true for the
-ProxyPassdirectives:-ProxyPass /special-area http://special.example.com smax=5 max=10 -ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On -+ProxyPass /special-area http://special.example.com smax=5 max=10 +ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On@@ -270,20 +248,16 @@ how directives are applied.A non-regex wildcard section that changes the configuration of all user directories could look as follows:
--<Directory /home/*/public_html> +<Directory /home/*/public_html> Options Indexes -</Directory> -+</Directory>Using regex sections, we can deny access to many types of image files at once:
--<FilesMatch \.(?i:gif|jpe?g|png)$> +<FilesMatch \.(?i:gif|jpe?g|png)$> Require all denied -</FilesMatch> -+</FilesMatch>Regular expressions containing named groups and @@ -292,11 +266,9 @@ corresponding name in uppercase. This allows elements of filename paths and URLs to be referenced from within expressions and modules like
-mod_rewrite.-<DirectoryMatch ^/var/www/combined/(?<SITENAME>[^/]+)> +@@ -307,11 +279,9 @@ directive change the configuration depending on a condition which can be expressed by a boolean expression. For example, the following configuration denies access if the HTTP Referer header does not start with "http://www.example.com/". -<DirectoryMatch ^/var/www/combined/(?<SITENAME>[^/]+)> require ldap-group cn=%{env:SITENAME},ou=combined,o=Example -</DirectoryMatch> -+</DirectoryMatch>-<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')"> +@@ -330,11 +300,9 @@ different webspace locations (URLs) could map to the same filesystem location, allowing your restrictions to be circumvented. For example, consider the following configuration: -<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')"> Require all denied -</If> -+</If>-<Location /dir/> +<Location /dir/> Require all denied -</Location> -+</Location>This works fine if the request is for @@ -395,11 +363,9 @@ that match the specified URL. For example, the following configuration will prevent the proxy server from being used to access the
-www.example.comwebsite.-<Proxy http://www.example.com/*> +<Proxy http://www.example.com/*> Require all granted -</Proxy> -+</Proxy>@@ -508,8 +474,7 @@ merging. Assuming they all apply to the request, the directives in this example will be applied in the order A > B > C > D > E. --<Location /> +<Location /> E </Location> @@ -529,9 +494,7 @@ E. <Directory /a/b> A -</Directory> - -+</Directory>For a more concrete example, consider the following. Regardless of @@ -539,8 +502,7 @@ any access restrictions placed in
Require all granted Require not host badguy.example.com </RequireAll> -</Directory> - +</Directory> diff --git a/docs/manual/sections.html.fr b/docs/manual/sections.html.fr index 84de96b4cf..50c5217762 100644 --- a/docs/manual/sections.html.fr +++ b/docs/manual/sections.html.fr @@ -68,11 +68,9 @@ avec la configuration suivante, toutes les requ un autre site si le serveur est démarré en utilisant la ligne de commande :-<Location /> +<Location /> Require all granted </Location> @@ -550,8 +512,7 @@ other words, order of merging is important, so be careful!httpd -DClosedForNow: --<IfDefine ClosedForNow> +<IfDefine ClosedForNow> Redirect / http://otherserver.example.com/ -</IfDefine> -+</IfDefine>Le conteneur
<IfModule>@@ -90,11 +88,9 @@ systDans l'exemple suivant, la directive
-MimeMagicFilene s'appliquera que si le modulemod_mime_magicest disponible.-<IfModule mod_mime_magic.c> +<IfModule mod_mime_magic.c> MimeMagicFile conf/magic -</IfModule> -+</IfModule>Le conteneur @@ -105,12 +101,10 @@ conteneur a et les grands réseaux qui doivent prendre en compte différentes versions et configurations de httpd.
--<IfVersion >= 2.4> +<IfVersion >= 2.4> # les directives situées ici ne s'appliquent que si la version+</IfVersion>
# est supérieure ou égale à 2.4.0. -</IfVersion> --
<IfDefine>, @@ -160,11 +154,9 @@ Le m configuration suivante, l'indexation sera activée pour le répertoire/var/web/dir1et tous ses sous-répertoires.-<Directory /var/web/dir1> +<Directory /var/web/dir1> Options +Indexes -</Directory> -+</Directory>Les directives contenues dans une section
-<Files>s'appliquent à tout fichier @@ -174,11 +166,9 @@ plac l'accès à tout fichier nomméprivate.htmlquel que soit l'endroit où il se trouve.-<Files private.html> +<Files private.html> Require all denied -</Files> -+</Files>Pour faire référence à des fichiers qui se trouvent en des points @@ -192,13 +182,11 @@ l'acc
-private.htmlqui se trouve dans l'arborescence/var/web/dir1/.-<Directory /var/web/dir1> +@@ -216,11 +204,9 @@ En particulier, l'interdiction s'appliquera aux requ<Directory /var/web/dir1> <Files private.html> Require all denied </Files> -</Directory> -+</Directory>http://yoursite.example.com/private/dir/file.htmlainsi qu'à toute requête commençant par la chaîne de caractères/private. --<LocationMatch ^/private> +<LocationMatch ^/private> Require all denied -</LocationMatch> -+</LocationMatch>Le conteneur
-<Location>@@ -231,11 +217,9 @@ particuli Il n'est pas nécessaire de trouver un fichier nomméserver-statusdans le système de fichiers.-<Location /server-status> +@@ -244,24 +228,18 @@ dans le syst dans lequel certaines sections ou directives sont évaluées. Pour<Location /server-status> SetHandler server-status -</Location> -+</Location><Location>, on doit avoir : --<Location /foo> +<Location /foo> </Location> <Location /foo/bar> -</Location> -+</Location>Les directives
-<Alias>, quant à elles, sont évaluées vice-versa :-Alias /foo/bar /srv/www/uncommon/bar -Alias /foo /srv/www/common/foo -+Alias /foo/bar /srv/www/uncommon/bar +Alias /foo /srv/www/common/fooCeci est aussi vrai pour les directives
-ProxyPass:-ProxyPass /special-area http://special.example.com smax=5 max=10 -ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On -+ProxyPass /special-area http://special.example.com smax=5 max=10 +ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On@@ -297,21 +275,17 @@ r mais sans utiliser les expressions rationnelles pourrait ressembler à ceci : --<Directory /home/*/public_html> +<Directory /home/*/public_html> Options Indexes -</Directory> -+</Directory>Avec les conteneurs utilisant les expressions rationnelles, on peut interdire l'accès à de nombreux types de fichiers d'images simultanément :
--+<FilesMatch \.(?i:gif|jpe?g|png)$> ++<FilesMatch \.(?i:gif|jpe?g|png)$> Require all denied -</FilesMatch> -+</FilesMatch>Les expressions rationnelles contenant des groupes nommés et @@ -320,11 +294,9 @@ leur nom en majuscules. Ceci permet de r chemins de fichiers et d'URLs depuis une expression et au sein de modules comme
-mod_rewrite.-<DirectoryMatch ^/var/www/combined/(?<SITENAME>[^/]+)> +@@ -335,11 +307,9 @@ permet de modifier la configuration en fonction d'une condition qui peut être définie sous la forme d'une expression booléenne. Dans l'exemple suivant, l'accès est interdit si l'en-tête HTTP Referer ne commence pas par "http://www.example.com/". -<DirectoryMatch ^/var/www/combined/(?<SITENAME>[^/]+)> require ldap-group cn=%{env:SITENAME},ou=combined,o=Example -</DirectoryMatch> -+</DirectoryMatch>-<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')"> +@@ -359,11 +329,9 @@ l'arborescence du site web (URLs) peuvent correspondre du système de fichier, ce qui peut permettre de contourner vos restrictions. Par exemple, imaginez la configuration suivante : -<If "!(%{HTTP_REFERER} -strmatch 'http://www.example.com/*')"> Require all denied -</If> -+</If>-<Location /dir/> +<Location /dir/> Require all denied -</Location> -+</Location>Elle fonctionne correctement si la requête appelle @@ -434,11 +402,9 @@ Par exemple, la configuration suivante va interdire l'utilisation du serveur proxy pour accéder au site
-www.example.com.-<Proxy http://www.example.com/*> +<Proxy http://www.example.com/*> Require all granted -</Proxy> -+</Proxy>@@ -558,8 +524,7 @@ En supposant qu'elles s'appliquent toutes cet exemple seront appliquées dans l'ordre suivant : A > B > C > D > E. -@@ -69,19 +67,15 @@ requires a strong cipher for access to a particular URL? only?-<Location /> +<Location /> E </Location> @@ -579,9 +544,7 @@ E. <Directory /a/b> A -</Directory> - -+</Directory>Pour un exemple plus concret, considérez ce qui suit. Sans tenir compte @@ -590,8 +553,7 @@ de toute restriction d'acc En d'autres termes, l'ordre de la combinaison des sections est important, soyez donc prudent !
--<Location /> +diff --git a/docs/manual/ssl/ssl_faq.html.en b/docs/manual/ssl/ssl_faq.html.en index 71817b080d..1c4b415d59 100644 --- a/docs/manual/ssl/ssl_faq.html.en +++ b/docs/manual/ssl/ssl_faq.html.en @@ -176,11 +176,9 @@ relative hyperlinks? fully-qualified hyperlinks (because you have to change the URL scheme). Using<Location /> Require all granted </Location> @@ -601,8 +563,7 @@ soyez donc prudent ! Require all granted Require not host badguy.example.com </RequireAll> -</Directory> -+</Directory>mod_rewritehowever, you can manipulate relative hyperlinks, to achieve the same effect. --RewriteEngine on +RewriteEngine on RewriteRule ^/(.*)_SSL$ https://%{SERVER_NAME}/$1 [R,L] -RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L] -+RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L]This rewrite ruleset lets you use hyperlinks of the form @@ -257,10 +255,8 @@ Certificate for testing purposes? -keyout server.key
These can be used as follows in yourhttpd.conffile: --SSLCertificateFile /path/to/this/server.crt -SSLCertificateKeyFile /path/to/this/server.key -+SSLCertificateFile /path/to/this/server.crt +SSLCertificateKeyFile /path/to/this/server.keyIt is important that you are aware that this @@ -338,10 +334,8 @@ SSLCertificateKeyFile /path/to/this/server.key You should now have two files: @@ -656,9 +650,7 @@ Virtual Hosting to identify different SSL virtual hosts? you must make sure to put the non-SSL port number on the NameVirtualHost directive, e.g. -server.keyandserver.crt. These can be used as follows in yourhttpd.conffile: --SSLCertificateFile /path/to/this/server.crt -SSLCertificateKeyFile /path/to/this/server.key -+SSLCertificateFile /path/to/this/server.crt +SSLCertificateKeyFile /path/to/this/server.keyTheserver.csrfile is no longer needed.- NameVirtualHost 192.168.1.1:80 -+NameVirtualHost 192.168.1.1:80Other workaround solutions include:
@@ -709,11 +701,9 @@ Explorer (MSIE)? keep-alive connections or send the SSL close notify messages to MSIE clients. This can be done by using the following directive in your SSL-aware virtual host section: --SetEnvIf User-Agent "MSIE [2-5]" \ +SetEnvIf User-Agent "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 -+ downgrade-1.0 force-response-1.0Further, some MSIE versions have problems with particular ciphers. Unfortunately, it is not possible to implement a MSIE-specific diff --git a/docs/manual/ssl/ssl_faq.html.fr b/docs/manual/ssl/ssl_faq.html.fr index 19e22bca25..c0d815b229 100644 --- a/docs/manual/ssl/ssl_faq.html.fr +++ b/docs/manual/ssl/ssl_faq.html.fr @@ -189,11 +189,9 @@ HTTPS dans les hyperliens relatifs ? hyperliens pleinement qualifiés (car vous devez modifier le schéma de l'URL). Cependant, à l'aide du module
-mod_rewrite, vous pouvez manipuler des hyperliens relatifs, pour obtenir le même effet.-RewriteEngine on +RewriteEngine on RewriteRule ^/(.*)_SSL$ https://%{SERVER_NAME}/$1 [R,L] -RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L] -+RewriteRule ^/(.*)_NOSSL$ http://%{SERVER_NAME}/$1 [R,L]Ce jeu de règles rewrite vous permet d'utiliser des hyperliens de la @@ -273,10 +271,8 @@ fins de test ? -keyout server.key
Ces fichiers seront utilisés comme suit dans votrehttpd.conf: --SSLCertificateFile /path/to/this/server.crt -SSLCertificateKeyFile /path/to/this/server.key -+SSLCertificateFile /path/to/this/server.crt +SSLCertificateKeyFile /path/to/this/server.keyIl est important de savoir que le fichier server.keyn'a @@ -357,10 +353,8 @@ SSLCertificateKeyFile /path/to/this/server.keyVous devez maintenant disposer de deux fichiers : @@ -713,9 +707,7 @@ pour diff (sur le port 443). Mais dans ce cas, vous devez définir le numéro de port non-SSL à l'aide de la directive NameVirtualHost dans ce style : -server.keyetserver.crt. Ils sont précisés dans votre fichierhttpd.confcomme suit : --SSLCertificateFile /path/to/this/server.crt -SSLCertificateKeyFile /path/to/this/server.key -+SSLCertificateFile /path/to/this/server.crt +SSLCertificateKeyFile /path/to/this/server.keyLe fichierserver.csrn'est plus nécessaire.- NameVirtualHost 192.168.1.1:80 -+NameVirtualHost 192.168.1.1:80il existe d'autres solutions alternatives comme :
@@ -773,11 +765,9 @@ versions de MSIE. Vous pouvez contourner ces probl ou l'envoi de messages de notification de fermeture de session SSL aux clients MSIE. Pour cela, vous pouvez utiliser la directive suivante dans votre section d'hôte virtuel avec support SSL : --SetEnvIf User-Agent "MSIE [2-5]" \ +SetEnvIf User-Agent "MSIE [2-5]" \ nokeepalive ssl-unclean-shutdown \ - downgrade-1.0 force-response-1.0 -+ downgrade-1.0 force-response-1.0En outre, certaines versions de MSIE ont des problèmes avec des algorithmes de chiffrement particuliers. Hélas, il n'est pas diff --git a/docs/manual/ssl/ssl_howto.html.en b/docs/manual/ssl/ssl_howto.html.en index 1d32b5e149..cb4f996cc2 100644 --- a/docs/manual/ssl/ssl_howto.html.en +++ b/docs/manual/ssl/ssl_howto.html.en @@ -44,15 +44,13 @@ before progressing to the advanced techniques.
Your SSL configuration will need to contain, at minimum, the following directives.
--Listen 443 +Listen 443 <VirtualHost *:443> ServerName www.example.com SSLEngine on SSLCertificateFile /path/to/www.example.com.cert SSLCertificateKeyFile /path/to/www.example.com.key -</VirtualHost> -+</VirtualHost>The following enables only the strongest ciphers:
-- SSLCipherSuite HIGH:!aNULL:!MD5 -+SSLCipherSuite HIGH:!aNULL:!MD5While with the following configuration you specify a preference for specific speed-optimized ciphers (which will be selected by mod_ssl, provided that they are supported by the client):
--SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5 -SSLHonorCipherOrder on -+SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5 +SSLHonorCipherOrder on@@ -95,16 +89,14 @@ URL? blocks, to give a per-directory solution, and can automatically force a renegotiation of the SSL parameters to meet the new configuration. This can be done as follows:-# be liberal in general +# be liberal in general SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP:+eNULL <Location /strong/area> # but https://hostname/strong/area/ and below # requires strong ciphers SSLCipherSuite HIGH:!aNULL:!MD5 -</Location> -+</Location>ca.crt) and then verify the clients against this certificate. --# require a client certificate which has to be directly +@@ -148,15 +138,13 @@ SSLCACertificateFile conf/ssl.crt/ca.crt you can use the per-directory reconfiguration features of# require a client certificate which has to be directly # signed by our CA certificate in ca.crt SSLVerifyClient require SSLVerifyDepth 1 -SSLCACertificateFile conf/ssl.crt/ca.crt -+SSLCACertificateFile conf/ssl.crt/ca.crtmod_ssl: --SSLVerifyClient none +@@ -176,8 +164,7 @@ SSLVerifyDepth 1 you should establish a password database containing all clients allowed, as follows: -SSLVerifyClient none SSLCACertificateFile conf/ssl.crt/ca.crt <Location /secure/area> SSLVerifyClient require SSLVerifyDepth 1 -</Location> -+</Location>-SSLVerifyClient none +SSLVerifyClient none SSLCACertificateFile conf/ssl.crt/ca.crt SSLCACertificatePath conf/ssl.crt @@ -191,16 +178,14 @@ SSLCACertificatePath conf/ssl.crt AuthBasicProvider file AuthUserFile /usr/local/apache2/conf/httpd.passwd Require valid-user -</Directory> -+</Directory>The password used in this example is the DES encrypted string "password". See the
-SSLOptionsdocs for more information.diff --git a/docs/manual/ssl/ssl_howto.html.fr b/docs/manual/ssl/ssl_howto.html.fr index 9f48acd68b..199d8469b7 100644 --- a/docs/manual/ssl/ssl_howto.html.fr +++ b/docs/manual/ssl/ssl_howto.html.fr @@ -49,15 +49,13 @@ acchttpd.passwd
-/C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA +@@ -208,8 +193,7 @@ SSLCACertificatePath conf/ssl.crt into the DN, you can match them more easily usinghttpd.passwd
/C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA /C=US/L=S.F./O=Snake Oil, Ltd./OU=CA/CN=Bar:xxj31ZMTZzkVA /C=US/L=L.A./O=Snake Oil, Ltd./OU=Dev/CN=Quux:xxj31ZMTZzkVASSLRequire, as follows: --SSLVerifyClient none +@@ -237,8 +220,7 @@ plain HTTP access for clients on the Intranet. This configuration should remain outside of your HTTPS virtual host, so that it applies to both HTTPS and HTTP. -SSLVerifyClient none SSLCACertificateFile conf/ssl.crt/ca.crt SSLCACertificatePath conf/ssl.crt @@ -220,8 +204,7 @@ SSLCACertificatePath conf/ssl.crt SSLRequireSSL SSLRequire %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} -</Directory> -+</Directory>-SSLCACertificateFile conf/ssl.crt/company-ca.crt +SSLCACertificateFile conf/ssl.crt/company-ca.crt <Directory /usr/local/apache2/htdocs> # Outside the subarea only Intranet access is granted @@ -275,8 +257,7 @@ SSLCACertificateFile conf/ssl.crt/company-ca.crt AuthBasicProvider file AuthUserFile conf/protected.passwd Require valid-user -</Directory> -+</Directory>Votre configuration SSL doit comporter au moins les directives suivantes :
--Listen 443 +Listen 443 <VirtualHost *:443> ServerName www.example.com SSLEngine on SSLCertificateFile /path/to/www.example.com.cert SSLCertificateKeyFile /path/to/www.example.com.key -</VirtualHost> -+</VirtualHost>Les directives suivantes ne permettent que les chiffrements de plus haut niveau :
-- SSLCipherSuite HIGH:!aNULL:!MD5 -+SSLCipherSuite HIGH:!aNULL:!MD5@@ -91,10 +87,8 @@ que le chiffrement fort ? rapidité (le choix final sera opéré par mod_ssl, dans la mesure ou le client les supporte) : --SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5 -SSLHonorCipherOrder on -+SSLCipherSuite RC4-SHA:AES128-SHA:HIGH:!aNULL:!MD5 +SSLHonorCipherOrder on@@ -110,16 +104,14 @@ accmod_sslpeut alors forcer automatiquement une renégociation des paramètres SSL pour parvenir au but recherché. Cette configuration peut se présenter comme suit : --# soyons très tolérant a priori +# soyons très tolérant a priori SSLCipherSuite ALL:!aNULL:RC4+RSA:+HIGH:+MEDIUM:+LOW:+EXP:+eNULL <Location /strong/area> # sauf pour https://hostname/strong/area/ et ses sous-répertoires # qui exigent des chiffrements forts SSLCipherSuite HIGH:!aNULL:!MD5 -</Location> -+</Location>@@ -153,13 +145,11 @@ provenance de l'Internet ? le certificat de votre propre autorité de certification (ca.crt), et d'authentifier les clients à l'aide de ces certificats. --# exige un certificat client signé par le certificat de votre CA +@@ -173,15 +163,13 @@ mais autoriser quand-m URL particulière, vous pouvez utiliser les fonctionnalités de reconfiguration de# exige un certificat client signé par le certificat de votre CA # contenu dans ca.crt SSLVerifyClient require SSLVerifyDepth 1 -SSLCACertificateFile conf/ssl.crt/ca.crt -+SSLCACertificateFile conf/ssl.crt/ca.crtmod_sslen fonction du répertoire : --SSLVerifyClient none +@@ -204,8 +192,7 @@ l'acc de données de mots de passe contenant tous les clients autorisés, comme suit : -SSLVerifyClient none SSLCACertificateFile conf/ssl.crt/ca.crt <Location /secure/area> SSLVerifyClient require SSLVerifyDepth 1 -</Location> -+</Location>-SSLVerifyClient none +@@ -229,8 +215,7 @@ SSLVerifyClient require directiveSSLVerifyClient none SSLCACertificateFile conf/ssl.crt/ca.crt SSLCACertificatePath conf/ssl.crt @@ -219,8 +206,7 @@ SSLVerifyClient require AuthBasicProvider file AuthUserFile /usr/local/apache2/conf/httpd.passwd Require valid-user -</Directory> -+</Directory>SSLOptionspour plus de détails. -diff --git a/docs/manual/suexec.html.en b/docs/manual/suexec.html.en index e981d5c93c..b6fcaa1d0e 100644 --- a/docs/manual/suexec.html.en +++ b/docs/manual/suexec.html.en @@ -497,10 +497,8 @@httpd.passwd
-/C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA +@@ -239,8 +224,7 @@ SSLVerifyClient require utilisant la directivehttpd.passwd
/C=DE/L=Munich/O=Snake Oil, Ltd./OU=Staff/CN=Foo:xxj31ZMTZzkVA /C=US/L=S.F./O=Snake Oil, Ltd./OU=CA/CN=Bar:xxj31ZMTZzkVA /C=US/L=L.A./O=Snake Oil, Ltd./OU=Dev/CN=Quux:xxj31ZMTZzkVASSLRequire, comme suit : --SSLVerifyClient none +@@ -270,8 +253,7 @@ aux clients de l'intranet. doivent se trouver en dehors de votre hôte virtuel HTTPS, afin qu'elles s'appliquent à la fois à HTTP et HTTPS. -SSLVerifyClient none SSLCACertificateFile conf/ssl.crt/ca.crt SSLCACertificatePath conf/ssl.crt @@ -251,8 +235,7 @@ SSLCACertificatePath conf/ssl.crt SSLRequireSSL SSLRequire %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} -</Directory> -+</Directory>-SSLCACertificateFile conf/ssl.crt/company-ca.crt +SSLCACertificateFile conf/ssl.crt/company-ca.crt <Directory /usr/local/apache2/htdocs> # En dehors de subarea, seul l'accès depuis l'intranet est @@ -310,8 +292,7 @@ SSLCACertificateFile conf/ssl.crt/company-ca.crt AuthBasicProvider file AuthUserFile conf/protected.passwd Require valid-user -</Directory> -+</Directory>If for example, your web server is configured to run as:
--User www -Group webgroup -+User www +Group webgroupand
suexecis installed at diff --git a/docs/manual/suexec.html.fr b/docs/manual/suexec.html.fr index d7befc6449..b8461221b2 100644 --- a/docs/manual/suexec.html.fr +++ b/docs/manual/suexec.html.fr @@ -531,10 +531,8 @@ de suEXECSi, par exemple, votre serveur web est configuré pour s'exécuter en tant que :
--User www -Group webgroup -+User www +Group webgroupet
suexecse trouve à diff --git a/docs/manual/upgrading.html.en b/docs/manual/upgrading.html.en index 1326b319cd..1a8acba263 100644 --- a/docs/manual/upgrading.html.en +++ b/docs/manual/upgrading.html.en @@ -140,39 +140,27 @@ access control.In this example, all requests are denied.
-2.2 configuration:
-Order deny,allow -Deny from all -+-2.2 configuration:
Order deny,allow +Deny from all2.4 configuration:
- Require all denied -+2.4 configuration:
Require all deniedIn this example, all requests are allowed.
-@@ -402,11 +386,9 @@ Listen 80 d'adresses IP ou de ports non connus, c'est-à-dire, d'un couple adresse/port non traité par aucun autre serveur virtuel. -2.2 configuration:
-Order allow,deny -Allow from all -+-2.2 configuration:
Order allow,deny +Allow from all@@ -380,14 +366,12 @@ Listen 80 transfert, au cas où plusieurs noms de domaines cohabitent sur une même machine. -2.4 configuration:
- Require all granted -+2.4 configuration:
Require all grantedIn the following example, all hosts in the example.org domain are allowed access; all other hosts are denied access.
-@@ -336,8 +324,7 @@ Listen 172.20.30.50:8080 section un serveur virtuel sélectionnable uniquement en fonction de son adresse IP. -2.2 configuration:
-Order Deny,Allow +-2.2 configuration:
Order Deny,Allow Deny from all -Allow from example.org -+Allow from example.org@@ -267,8 +259,7 @@ Listen 8080 et2.4 configuration:
- Require host example.org -+diff --git a/docs/manual/upgrading.html.fr b/docs/manual/upgrading.html.fr index c057b18462..85ee7de601 100644 --- a/docs/manual/upgrading.html.fr +++ b/docs/manual/upgrading.html.fr @@ -149,39 +149,27 @@ n la nouvelle méthode :2.4 configuration:
Require host example.orgDans cet exemple, toutes les requêtes sont rejetées :
--version 2.2 :
-Order deny,allow -Deny from all -+-version 2.2 :
Order deny,allow +Deny from all@@ -388,11 +372,9 @@ Listen 80 port, i.e., an address/port combination that is not used for any other virtual host. -version 2.4 :
- Require all denied -+version 2.4 :
Require all deniedDans cet exemple, toutes les requêtes sont acceptées :
-@@ -366,14 +352,12 @@ Listen 80 passed through, in case we are proxying multiple hostnames to a single machine. -version 2.2 :
-Order allow,deny -Allow from all -+-version 2.2 :
Order allow,deny +Allow from all@@ -323,8 +311,7 @@ Listen 172.20.30.50:8080version 2.4 :
- Require all granted -+version 2.4 :
Require all grantedDans l'exemple suivant, tous les hôtes du domaine example.org ont l'autorisation d'accès, tous les autres sont rejetés :
-@@ -256,8 +248,7 @@ Listen 8080version 2.2 :
-Order Deny,Allow +-version 2.2 :
Order Deny,Allow Deny from all -Allow from example.org -+Allow from example.orgversion 2.4 :
- Require host example.org -+diff --git a/docs/manual/urlmapping.html.en b/docs/manual/urlmapping.html.en index cde87a975d..bc46837704 100644 --- a/docs/manual/urlmapping.html.en +++ b/docs/manual/urlmapping.html.en @@ -129,9 +129,7 @@ expression based matching and substitution. For example, -version 2.4 :
Require host example.org- ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2 -+ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2will map a request to @@ -178,9 +176,7 @@
-/home/user/public_html/file.html, use the followingAliasMatchdirective:- AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$ /home/$1/public_html/$3 -+AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$ /home/$1/public_html/$3@@ -198,9 +194,7 @@ to the new directory/bar/, you can instruct clients to request the content at the new location as follows: -- Redirect permanent /foo/ http://www.example.com/bar/ -+Redirect permanent /foo/ http://www.example.com/bar/This will redirect any URL-Path starting in @@ -214,17 +208,13 @@ for the site home page to a different site, but leave all other requests alone, use the following configuration:
-- RedirectMatch permanent ^/$ http://www.example.com/startpage.html -+RedirectMatch permanent ^/$ http://www.example.com/startpage.htmlAlternatively, to temporarily redirect all pages on one site to a particular page on another site, use the following:
-- RedirectMatch temp .* http://othersite.example.com/startpage.html -+RedirectMatch temp .* http://othersite.example.com/startpage.html@@ -243,12 +233,10 @@ the/bar/directory oninternal.example.comand returns them to the client as if they were from the local server. --ProxyPass /foo/ http://internal.example.com/bar/
+ProxyPass /foo/ http://internal.example.com/bar/+ProxyPassReverseCookiePath /foo/ /bar/
ProxyPassReverse /foo/ http://internal.example.com/bar/
ProxyPassReverseCookieDomain internal.example.com public.example.com
-ProxyPassReverseCookiePath /foo/ /bar/ -The
-ProxyPassconfigures @@ -268,9 +256,7 @@ breaking out of the proxy server and requesting directly from content) in a page as it is being served to the client usingmod_substitute.-Substitute s/internal\.example\.com/www.example.com/i -+Substitute s/internal\.example\.com/www.example.com/iFor more sophisticated rewriting of links in HTML and XHTML, the diff --git a/docs/manual/urlmapping.html.fr b/docs/manual/urlmapping.html.fr index 8afea928f1..230729158f 100644 --- a/docs/manual/urlmapping.html.fr +++ b/docs/manual/urlmapping.html.fr @@ -141,9 +141,7 @@ l'arborescence DocumentRoot sur les expressions rationnelles. Par exemple,
-- ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2 -+ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+) /home/$1/cgi-bin/$2fera correspondre une requête du style @@ -192,9 +190,7 @@ l'arborescence DocumentRoot
-/home/user/public_html/file.html, utilisez la directiveAliasMatchsuivante :- AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$ /home/$1/public_html/$3 -+AliasMatch ^/upages/([a-zA-Z0-9]+)(/(.*))?$ /home/$1/public_html/$3@@ -214,9 +210,7 @@ l'arborescence DocumentRoot nouveau répertoire/bar/, vous pouvez demander aux clients de le requérir à sa nouvelle localisation comme suit : -- Redirect permanent /foo/ http://www.example.com/bar/ -+Redirect permanent /foo/ http://www.example.com/bar/Ceci aura pour effet de rediriger tout chemin d'URL commençant par @@ -231,17 +225,13 @@ l'arborescence DocumentRoot laisser toutes les autres requêtes inchangées, utilisez la configuration suivante :
-- RedirectMatch permanent ^/$ http://www.example.com/startpage.html -+RedirectMatch permanent ^/$ http://www.example.com/startpage.htmlDe même, pour rediriger temporairement toutes les pages d'un site vers une page particulière d'un autre site, utilisez ce qui suit :
-- RedirectMatch temp .* http://othersite.example.com/startpage.html -+RedirectMatch temp .* http://othersite.example.com/startpage.html@@ -261,12 +251,10 @@ dans le r-/bar/surinternal.example.comet les renvoie au client comme s'ils appartenaient au serveur local. --ProxyPass /foo/ http://internal.example.com/bar/
+ProxyPass /foo/ http://internal.example.com/bar/+ProxyPassReverseCookiePath /foo/ /bar/
ProxyPassReverse /foo/ http://internal.example.com/bar/
ProxyPassReverseCookieDomain internal.example.com public.example.com
-ProxyPassReverseCookiePath /foo/ /bar/ -La directive
-ProxyPassconfigure @@ -286,9 +274,7 @@ du serveur mandataire et effectuer sa requ d'utres contenus) situés dans la page au moment où elle est envoyée au client en utilisant le modulemod_substitute.-Substitute s/internal\.example\.com/www.example.com/i -+Substitute s/internal\.example\.com/www.example.com/iLe module
mod_proxy_htmlrend possible une réécriture plus diff --git a/docs/manual/vhosts/examples.html.en b/docs/manual/vhosts/examples.html.en index bf80e278b2..8039d7f46b 100644 --- a/docs/manual/vhosts/examples.html.en +++ b/docs/manual/vhosts/examples.html.en @@ -78,8 +78,7 @@hostsentries.-# Ensure that Apache listens on port 80 +# Ensure that Apache listens on port 80 Listen 80 <VirtualHost *:80> DocumentRoot /www/example1 @@ -93,8 +92,7 @@ Listen 80 ServerName www.example.org # Other directives here -</VirtualHost> -+</VirtualHost>The asterisks match all addresses, so the main server serves no @@ -142,8 +140,7 @@ Listen 80 will serve the "main" server,
-server.example.comand on the other (172.20.30.50), we will serve two or more virtual hosts.-Listen 80 +Listen 80 # This is the "main" server running on 172.20.30.40 ServerName server.example.com @@ -161,8 +158,7 @@ DocumentRoot /www/mainserver ServerName www.example.org # Other directives here ... -</VirtualHost> -+</VirtualHost>Any request to an address other than
-172.20.30.50will be @@ -188,13 +184,11 @@ DocumentRoot /www/mainserver with the same content, with just oneVirtualHostsection.-<VirtualHost 192.168.1.1 172.20.30.40> +<VirtualHost 192.168.1.1 172.20.30.40> DocumentRoot /www/server1 ServerName server.example.com ServerAlias server -</VirtualHost> -+</VirtualHost>Now requests from both networks will be served from the same @@ -221,8 +215,7 @@ DocumentRoot /www/mainserver takes place after the best matching IP address and port combination is determined.
--Listen 80 +Listen 80 Listen 8080 <VirtualHost 172.20.30.40:80> @@ -243,8 +236,7 @@ Listen 8080 <VirtualHost 172.20.30.40:8080> ServerName www.example.org DocumentRoot /www/otherdomain-8080 -</VirtualHost> -+</VirtualHost>www.example.comandwww.example.orgrespectively. --Listen 80 +Listen 80 <VirtualHost 172.20.30.40> DocumentRoot /www/example1 @@ -267,8 +258,7 @@ Listen 80 <VirtualHost 172.20.30.50> DocumentRoot /www/example2 ServerName www.example.org -</VirtualHost> -+</VirtualHost>Requests for any address not specified in one of the @@ -287,8 +277,7 @@ Listen 80 respectively. In each case, we want to run hosts on ports 80 and 8080.
--Listen 172.20.30.40:80 +Listen 172.20.30.40:80 Listen 172.20.30.40:8080 Listen 172.20.30.50:80 Listen 172.20.30.50:8080 @@ -311,8 +300,7 @@ Listen 172.20.30.50:8080 <VirtualHost 172.20.30.50:8080> DocumentRoot /www/example2-8080 ServerName www.example.org -</VirtualHost> -+</VirtualHost>Any address mentioned in the argument to a virtualhost that never appears in another virtual host is a strictly IP-based virtual host.
--Listen 80 +Listen 80 <VirtualHost 172.20.30.40> DocumentRoot /www/example1 ServerName www.example.com @@ -349,8 +336,7 @@ Listen 80 <VirtualHost 172.20.30.60> DocumentRoot /www/example5 ServerName www.example.gov -</VirtualHost> -+</VirtualHost>-<VirtualHost *:*> +<VirtualHost *:*> ProxyPreserveHost On ProxyPass / http://192.168.111.2/ ProxyPassReverse / http://192.168.111.2/ ServerName hostname.example.com -</VirtualHost> -+</VirtualHost>-<VirtualHost _default_:*> +<VirtualHost _default_:*> DocumentRoot /www/default -</VirtualHost> -+</VirtualHost>Using such a default vhost with a wildcard port effectively prevents @@ -415,8 +397,7 @@ Listen 80
Same as setup 1, but the server listens on several ports and we want to use a second
-_default_vhost for port 80.-<VirtualHost _default_:80> +<VirtualHost _default_:80> DocumentRoot /www/default80 # ... </VirtualHost> @@ -424,8 +405,7 @@ Listen 80 <VirtualHost _default_:*> DocumentRoot /www/default # ... -</VirtualHost> -+</VirtualHost>The default vhost for port 80 (which must appear before any @@ -440,12 +420,10 @@ Listen 80
We want to have a default vhost for port 80, but no other default vhosts.
--<VirtualHost _default_:80> +<VirtualHost _default_:80> DocumentRoot /www/default ... -</VirtualHost> -+</VirtualHost>A request to an unspecified address on port 80 is served from the @@ -473,8 +451,7 @@ DocumentRoot /www/default (
-172.20.30.50) to theVirtualHostdirective.-Listen 80 +Listen 80 ServerName www.example.com DocumentRoot /www/example1 @@ -489,8 +466,7 @@ DocumentRoot /www/example1 ServerName www.example.net ServerAlias *.example.net # ... -</VirtualHost> -+</VirtualHost>The vhost can now be accessed through the new address (as an @@ -511,8 +487,7 @@ DocumentRoot /www/example1 containing links with an URL prefix to the name-based virtual hosts.
--<VirtualHost 172.20.30.40> +<VirtualHost 172.20.30.40> # primary vhost DocumentRoot /www/subdomain RewriteEngine On @@ -536,8 +511,7 @@ DocumentRoot /www/subdomain/sub1 RewriteEngine On RewriteRule ^(/sub2/.*) /www/subdomain$1 # ... -</VirtualHost> -+</VirtualHost>Due to the
ServerPathdiff --git a/docs/manual/vhosts/examples.html.fr b/docs/manual/vhosts/examples.html.fr index 1444472f91..1d852a056f 100644 --- a/docs/manual/vhosts/examples.html.fr +++ b/docs/manual/vhosts/examples.html.fr @@ -82,8 +82,7 @@ que sur la machine possédant ces entrées.-# Apache doit écouter sur le port 80 +@@ -152,8 +150,7 @@ Listen 80 (# Apache doit écouter sur le port 80 Listen 80 <VirtualHost *:80> DocumentRoot /www/example1 @@ -97,8 +96,7 @@ Listen 80 ServerName www.example.org # Autres directives ici -</VirtualHost> -+</VirtualHost>172.20.30.50), deux serveurs virtuels (ou plus) répondront. --Listen 80 +Listen 80 # Serveur "principal" sur 172.20.30.40 ServerName server.example.com @@ -171,8 +168,7 @@ DocumentRoot /www/mainserver ServerName www.example.org # D'autres directives ici ... -</VirtualHost> -+</VirtualHost>Toute requête arrivant sur une autre adresse que @@ -199,13 +195,11 @@ DocumentRoot /www/mainserver aux requêtes internes et externes, au moyen d'une seule section
-VirtualHost.-<VirtualHost 192.168.1.1 172.20.30.40> +<VirtualHost 192.168.1.1 172.20.30.40> DocumentRoot /www/server1 ServerName server.example.com ServerAlias server -</VirtualHost> -+</VirtualHost>Ainsi, les requêtes en provenance de chacun des deux réseaux @@ -233,8 +227,7 @@ DocumentRoot /www/mainserver la sélection de la meilleure correspondance du point de vue adresse IP/port.
--Listen 80 +Listen 80 Listen 8080 <VirtualHost 172.20.30.40:80> @@ -255,8 +248,7 @@ Listen 8080 <VirtualHost 172.20.30.40:8080> ServerName www.example.org DocumentRoot /www/otherdomain-8080 -</VirtualHost> -+</VirtualHost>172.20.30.50) correspondant respectivement aux nomswww.example.cometwww.example.org. --Listen 80 +Listen 80 <VirtualHost 172.20.30.40> DocumentRoot /www/example1 @@ -278,8 +269,7 @@ Listen 80 <VirtualHost 172.20.30.50> DocumentRoot /www/example2 ServerName www.example.org -</VirtualHost> -+</VirtualHost>Les requêtes provenant d'adresses non spécifiées dans l'une des @@ -298,8 +288,7 @@ Listen 80 Pour chacun d'eux, nous voulons un hébergement sur les ports 80 et 8080.
--Listen 172.20.30.40:80 +Listen 172.20.30.40:80 Listen 172.20.30.40:8080 Listen 172.20.30.50:80 Listen 172.20.30.50:8080 @@ -322,8 +311,7 @@ Listen 172.20.30.50:8080 <VirtualHost 172.20.30.50:8080> DocumentRoot /www/example2-8080 ServerName www.example.org -</VirtualHost> -+</VirtualHost>-Listen 80 +Listen 80 <VirtualHost 172.20.30.40> DocumentRoot /www/example1 ServerName www.example.com @@ -362,8 +349,7 @@ Listen 80 <VirtualHost 172.20.30.60> DocumentRoot /www/example5 ServerName www.example.gov -</VirtualHost> -+</VirtualHost>-<VirtualHost *:*> +<VirtualHost *:*> ProxyPreserveHost On ProxyPass / http://192.168.111.2/ ProxyPassReverse / http://192.168.111.2/ ServerName hostname.example.com -</VirtualHost> -+</VirtualHost>-<VirtualHost _default_:*> +<VirtualHost _default_:*> DocumentRoot /www/default -</VirtualHost> -+</VirtualHost>L'utilisation d'un tel serveur virtuel avec un joker pour le @@ -435,8 +417,7 @@ Listen 80 le serveur écoute sur plusieurs ports et un second serveur virtuel
-_default_pour le port 80 est ajouté.-<VirtualHost _default_:80> +<VirtualHost _default_:80> DocumentRoot /www/default80 # ... </VirtualHost> @@ -444,8 +425,7 @@ Listen 80 <VirtualHost _default_:*> DocumentRoot /www/default # ... -</VirtualHost> -+</VirtualHost>Le serveur virtuel par défaut défini pour le port 80 (il doit @@ -461,12 +441,10 @@ Listen 80
Nous voulons créer un serveur virtuel par défaut seulement pour le port 80.
--<VirtualHost _default_:80> +<VirtualHost _default_:80> DocumentRoot /www/default ... -</VirtualHost> -+</VirtualHost>Une requête vers une adresse non spécifiée sur le port 80 @@ -494,8 +472,7 @@ DocumentRoot /www/default adresse IP (
-172.20.30.50) dans la directiveVirtualHost.-Listen 80 +Listen 80 ServerName www.example.com DocumentRoot /www/example1 @@ -510,8 +487,7 @@ DocumentRoot /www/example1 ServerName www.example.net ServerAlias *.example.net # ... -</VirtualHost> -+</VirtualHost>Le serveur virtuel peut maintenant être joint par la nouvelle @@ -534,8 +510,7 @@ DocumentRoot /www/example1 des liens dont les URLs auront un préfixe identifiant les serveurs virtuels par nom.
--<VirtualHost 172.20.30.40> +<VirtualHost 172.20.30.40> # serveur virtuel primaire DocumentRoot /www/subdomain RewriteEngine On @@ -559,8 +534,7 @@ DocumentRoot /www/subdomain/sub1 RewriteEngine On RewriteRule ^(/sub2/.*) /www/subdomain$1 # ... -</VirtualHost> -+</VirtualHost>À cause de la directive diff --git a/docs/manual/vhosts/fd-limits.html.en b/docs/manual/vhosts/fd-limits.html.en index d47024a758..0359923868 100644 --- a/docs/manual/vhosts/fd-limits.html.en +++ b/docs/manual/vhosts/fd-limits.html.en @@ -94,10 +94,8 @@ LogFormat directive, and the
-%vvariable. Add this to the beginning of your log format string:-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 vhostThis will create a log file in the common log format, but with the diff --git a/docs/manual/vhosts/fd-limits.html.fr b/docs/manual/vhosts/fd-limits.html.fr index 7a8c3699e5..7953138a62 100644 --- a/docs/manual/vhosts/fd-limits.html.fr +++ b/docs/manual/vhosts/fd-limits.html.fr @@ -105,10 +105,8 @@ entr variable
-%v. Ajoutez cette variable au début de la chaîne de définition du format de journalisations :-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 vhostCette configuration va provoquer la création d'un fichier de diff --git a/docs/manual/vhosts/ip-based.html.en b/docs/manual/vhosts/ip-based.html.en index ef404fac02..2029db3752 100644 --- a/docs/manual/vhosts/ip-based.html.en +++ b/docs/manual/vhosts/ip-based.html.en @@ -113,9 +113,7 @@ Virtual Hosts to help you decide.
configuration file to select which IP address (or virtual host) that daemon services. e.g. -- Listen 192.0.2.100:80 -+Listen 192.0.2.100:80It is recommended that you use an IP address instead of a @@ -133,8 +131,7 @@ Virtual Hosts to help you decide.
configuration directives to different values for each virtual host. e.g. --<VirtualHost 172.20.30.40:80> +<VirtualHost 172.20.30.40:80> ServerAdmin webmaster@www1.example.com DocumentRoot /www/vhosts/www1 ServerName www1.example.com @@ -148,8 +145,7 @@ Virtual Hosts to help you decide. ServerName www2.example.org ErrorLog /www/logs/www2/error_log CustomLog /www/logs/www2/access_log combined -</VirtualHost> -+</VirtualHost>It is recommended that you use an IP address instead of a diff --git a/docs/manual/vhosts/ip-based.html.fr b/docs/manual/vhosts/ip-based.html.fr index 28b40af06f..27fe005a1c 100644 --- a/docs/manual/vhosts/ip-based.html.fr +++ b/docs/manual/vhosts/ip-based.html.fr @@ -110,9 +110,7 @@ r de configuration pour définir l'adresse IP (ou serveur virtuel) que le processus résident doit gérer. Par exemple :
-- Listen 192.0.2.100:80 -+Listen 192.0.2.100:80Il est recommandé d'utiliser une adresse IP plutôt qu'un nom @@ -137,8 +135,7 @@ r
-CustomLogavec des valeurs différentes pour chaque serveur virtuel. Par exemple :-<VirtualHost 172.20.30.40:80> +<VirtualHost 172.20.30.40:80> ServerAdmin webmaster@www1.example.com DocumentRoot /www/vhosts/www1 ServerName www1.example.com @@ -152,8 +149,7 @@ r ServerName www2.example.org ErrorLog /www/logs/www2/error_log CustomLog /www/logs/www2/access_log combined -</VirtualHost> -+</VirtualHost>Il est recommandé d'utiliser une adresse IP plutôt qu'un nom diff --git a/docs/manual/vhosts/mass.html.en b/docs/manual/vhosts/mass.html.en index fabd5f523a..b63cbaefda 100644 --- a/docs/manual/vhosts/mass.html.en +++ b/docs/manual/vhosts/mass.html.en @@ -56,8 +56,7 @@ mod_rewrite
-<VirtualHost>sections that are substantially the same, for example:-<VirtualHost 111.22.33.44> +<VirtualHost 111.22.33.44> ServerName customer-1.example.com DocumentRoot /www/hosts/customer-1.example.com/docs ScriptAlias /cgi-bin/ /www/hosts/customer-1.example.com/cgi-bin @@ -73,8 +72,7 @@ mod_rewrite ServerName customer-N.example.com DocumentRoot /www/hosts/customer-N.example.com/docs ScriptAlias /cgi-bin/ /www/hosts/customer-N.example.com/cgi-bin -</VirtualHost> -+</VirtualHost>We wish to replace these multiple @@ -159,8 +157,7 @@ mod_vhost_alias virtual host arrangement outlined in the Motivation section above using
-mod_vhost_alias.-# get the server name from the Host: header +# get the server name from the Host: header UseCanonicalName Off # this log format can be split per-virtual-host based on the first field @@ -170,8 +167,7 @@ CustomLog logs/access_log vcommon # include the server name in the filenames used to satisfy requests VirtualDocumentRoot /www/hosts/%0/docs -VirtualScriptAlias /www/hosts/%0/cgi-bin -+VirtualScriptAlias /www/hosts/%0/cgi-binThis configuration can be changed into an IP-based virtual @@ -197,8 +193,7 @@ examples.
/home/user/www. It uses a singlecgi-bindirectory instead of one per virtual host. --UseCanonicalName Off +UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon CustomLog logs/access_log vcommon @@ -207,8 +202,7 @@ CustomLog logs/access_log vcommon VirtualDocumentRoot /home/%2/www # single cgi-bin directory -ScriptAlias /cgi-bin/ /www/std-cgi/ -+ScriptAlias /cgi-bin/ /www/std-cgi/There are examples of more complicated @@ -229,8 +223,7 @@ ScriptAlias /cgi-bin/ /www/std-cgi/
-<VirtualHost>configuration sections, as shown below.-UseCanonicalName Off +UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon @@ -260,8 +253,7 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon VirtualDocumentRoot /www/homepages/%0/docs ScriptAlias /cgi-bin/ /www/std-cgi/ -</VirtualHost> -+</VirtualHost>@@ -287,8 +279,7 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon negating the need for a DNS lookup. Logging will also have to be adjusted to fit this system. -diff --git a/docs/manual/vhosts/mass.html.fr b/docs/manual/vhosts/mass.html.fr index 7645909c0a..962e961e28 100644 --- a/docs/manual/vhosts/mass.html.fr +++ b/docs/manual/vhosts/mass.html.fr @@ -58,8 +58,7 @@ mod_rewrite-# get the server name from the reverse DNS of the IP address +# get the server name from the reverse DNS of the IP address UseCanonicalName DNS # include the IP address in the logs so they may be split @@ -297,8 +288,7 @@ CustomLog logs/access_log vcommon # include the IP address in the filenames VirtualDocumentRootIP /www/hosts/%0/docs -VirtualScriptAliasIP /www/hosts/%0/cgi-bin -+VirtualScriptAliasIP /www/hosts/%0/cgi-bin<VirtualHost>très semblables, dans le style : --<VirtualHost 111.22.33.44> +<VirtualHost 111.22.33.44> ServerName customer-1.example.com DocumentRoot /www/hosts/customer-1.example.com/docs ScriptAlias /cgi-bin/ /www/hosts/customer-1.example.com/cgi-bin @@ -75,8 +74,7 @@ mod_rewrite ServerName customer-N.example.com DocumentRoot /www/hosts/customer-N.example.com/docs ScriptAlias /cgi-bin/ /www/hosts/customer-N.example.com/cgi-bin -</VirtualHost> -+</VirtualHost>Nous voulons remplacer toutes les configurations @@ -166,8 +164,7 @@ dynamique avec mod_vhost_alias l'hébergement virtuel décrit dans la section À qui ce document est-il destiné ? ci-dessus en utilisant
-mod_vhost_alias.-# extrait le nom du serveur de l'en-tête Host: +# extrait le nom du serveur de l'en-tête Host: UseCanonicalName Off # ce format de journal peut être éclaté en journaux par serveur virtuel @@ -178,8 +175,7 @@ CustomLog logs/access_log vcommon # inclut le nom du serveur dans les noms de fichiers ressources # nécessaires aux traitements des requêtes VirtualDocumentRoot /www/hosts/%0/docs -VirtualScriptAlias /www/hosts/%0/cgi-bin -+VirtualScriptAlias /www/hosts/%0/cgi-binPour changer cette configuration en solution de serveur virtuel @@ -207,8 +203,7 @@ simplifi
-cgi-binsuffit pour l'ensemble des serveurs virtuels.-UseCanonicalName Off +UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon CustomLog logs/access_log vcommon @@ -217,8 +212,7 @@ CustomLog logs/access_log vcommon VirtualDocumentRoot /home/%2/www # répertoire cgi-bin unique -ScriptAlias /cgi-bin/ /www/std-cgi/ -+ScriptAlias /cgi-bin/ /www/std-cgi/Vous trouverez des exemples plus élaborés d'utilisation de la @@ -240,8 +234,7 @@ d'h
-<VirtualHost>conventionnelles, comme indiqué plus loin.-UseCanonicalName Off +UseCanonicalName Off LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon @@ -271,8 +264,7 @@ LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon VirtualDocumentRoot /www/homepages/%0/docs ScriptAlias /cgi-bin/ /www/std-cgi/ -</VirtualHost> -+</VirtualHost>@@ -299,8 +291,7 @@ efficace la-même la nécessité d'une recherche DNS. La journalisation doit aussi être adaptée pour fonctionner sur un tel système. -diff --git a/docs/manual/vhosts/mass.html.tr.utf8 b/docs/manual/vhosts/mass.html.tr.utf8 index e6a83fbfae..6627afa8d8 100644 --- a/docs/manual/vhosts/mass.html.tr.utf8 +++ b/docs/manual/vhosts/mass.html.tr.utf8 @@ -54,8 +54,7 @@-# obtention du nom du serveur par recherche DNS inverse +# obtention du nom du serveur par recherche DNS inverse # sur l'adresse IP UseCanonicalName DNS @@ -311,8 +302,7 @@ CustomLog logs/access_log vcommon # insertion de l'adresse IP dans les noms de fichiers VirtualDocumentRootIP /www/hosts/%0/docs -VirtualScriptAliasIP /www/hosts/%0/cgi-bin -+VirtualScriptAliasIP /www/hosts/%0/cgi-bin<VirtualHost>bölümü içereceÄŸi zaman yapılacaklar ile ilgilidir. --<VirtualHost 111.22.33.44> +<VirtualHost 111.22.33.44> ServerName musteri-1.example.com DocumentRoot /siteler/musteri-1/belgeler ScriptAlias /cgi-bin/ /siteler/musteri-1/cgi-bin @@ -71,8 +70,7 @@ ServerName musteri-N.example.com DocumentRoot /siteler/musteri-N/belgeler ScriptAlias /cgi-bin/ /siteler/musteri-N/cgi-bin -</VirtualHost> -+</VirtualHost>İsteÄŸimiz çok sayıda
-<VirtualHost>bölümünü devingen olarak çalışan tek bir<VirtualHost>bölümüyle diff --git a/docs/manual/vhosts/name-based.html.en b/docs/manual/vhosts/name-based.html.en index ba5b6be133..58ee8098f7 100644 --- a/docs/manual/vhosts/name-based.html.en +++ b/docs/manual/vhosts/name-based.html.en @@ -128,8 +128,7 @@other.example.com, which points at the same IP address. Then you simply add the following tohttpd.conf:-<VirtualHost *:80> +<VirtualHost *:80> # This first-listed virtual host is also the default for *:80 ServerName www.example.com ServerAlias example.com @@ -139,8 +138,7 @@ <VirtualHost *:80> ServerName other.example.com DocumentRoot /www/otherdomain -</VirtualHost> -+</VirtualHost>You can alternatively specify an explicit IP address in place of the @@ -155,9 +153,7 @@ the listed names are other names which people can use to see that same web site:
-- ServerAlias example.com *.example.com -+ServerAlias example.com *.example.comthen requests for all hosts in the
-example.comdomain will diff --git a/docs/manual/vhosts/name-based.html.fr b/docs/manual/vhosts/name-based.html.fr index 9680e46ffb..705b463253 100644 --- a/docs/manual/vhosts/name-based.html.fr +++ b/docs/manual/vhosts/name-based.html.fr @@ -155,8 +155,7 @@ virtuel bas la même adresse IP. Il vous suffit d'ajouter la configuration suivante àhttpd.conf:-<VirtualHost *:80> +<VirtualHost *:80> # Le premier serveur virtuel de la liste est aussi le # serveur par défaut pour *:80 ServerName www.example.com @@ -167,8 +166,7 @@ virtuel bas <VirtualHost *:80> ServerName other.example.com DocumentRoot /www/otherdomain -</VirtualHost> -+</VirtualHost>Autrement, vous pouvez spécifiez une adresse IP explicite @@ -189,9 +187,7 @@ virtuel bas indique aux utilisateurs les autres noms permis pour accéder au même site Web :
-- ServerAlias example.com *.example.com -+ServerAlias example.com *.example.comainsi, toutes les requêtes portant sur un domaine