Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_auth_request_module.xml @ 993:a59aba3d4b67
Proxy: documented the "proxy_ssl_ciphers" directive.
While here, corrected the description for "proxy_ssl_protocols".
author | Andrei Belov <defan@nginx.com> |
---|---|
date | Wed, 02 Oct 2013 13:50:07 +0400 |
parents | 114b2933b2be |
children | 726ce61dc10d |
rev | line source |
---|---|
971
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
2 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
3 <!-- |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Maxim Dounin |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
6 --> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
7 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
9 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
10 <module name="Модуль ngx_http_auth_request_module" |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_auth_request_module.html" |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
12 lang="ru" |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
13 rev="1"> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
14 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
15 <section id="summary"> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
16 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
17 <para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
18 Модуль <literal>ngx_http_auth_request_module</literal> (1.5.4+) предоставляет |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
19 возможность авторизации клиента, основанной на результате подзапроса. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
20 Если подзапрос возвращает код ответа 2xx, доступ разрешается. |
977 | 21 Если 401 или 403 — доступ запрещается с соответствующим кодом ошибки. |
971
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
22 Любой другой код ответа, возвращаемый подзапросом, считается ошибкой. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
23 </para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
24 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
25 <para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
26 При ошибке 401 клиенту также передаётся заголовок |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
27 <header>WWW-Authenticate</header> из ответа подзапроса. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
28 </para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
29 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
30 <para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
31 По умолчанию этот модуль не собирается, его сборку необходимо |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
32 разрешить с помощью конфигурационного параметра |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
33 <literal>--with-http_auth_request_module</literal>. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
34 </para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
35 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
36 <para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
37 Модуль может быть |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
38 скомбинирован с другими модулями доступа, такими как |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
39 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link> и |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
40 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>, |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
41 с помощью директивы <link doc="ngx_http_core_module.xml" id="satisfy"/>. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
42 <note> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
43 В данный момент директивы |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
44 <link doc="ngx_http_proxy_module.xml" id="proxy_cache"/> и |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
45 <link doc="ngx_http_proxy_module.xml" id="proxy_store"/> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
46 (<link doc="ngx_http_fastcgi_module.xml" id="fastcgi_cache"/> и |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
47 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_store"/>) |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
48 невозможно использовать для обработки запросов, исходящих от модуля |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
49 <literal>ngx_http_auth_request_module</literal>. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
50 </note> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
51 </para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
52 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
53 </section> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
54 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
55 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
56 <section id="example" name="Пример конфигурации"> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
57 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
58 <para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
59 <example> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
60 location /private/ { |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
61 auth_request /auth; |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
62 ... |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
63 } |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
64 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
65 location = /auth { |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
66 proxy_pass ... |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
67 proxy_pass_request_body off; |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
68 proxy_set_header Content-Length ""; |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
69 proxy_set_header X-Original-URI $request_uri; |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
70 } |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
71 </example> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
72 </para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
73 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
74 </section> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
75 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
76 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
77 <section id="directives" name="Директивы"> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
78 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
79 <directive name="auth_request"> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
80 <syntax><value>uri</value> | <literal>off</literal></syntax> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
81 <default>off</default> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
82 <context>http</context> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
83 <context>server</context> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
84 <context>location</context> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
85 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
86 <para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
87 Включает авторизацию, основанную на результате выполнения подзапроса, |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
88 и задаёт URI, на который будет отправлен подзапрос. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
89 </para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
90 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
91 </directive> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
92 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
93 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
94 <directive name="auth_request_set"> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
95 <syntax><value>переменная</value> <value>значение</value></syntax> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
96 <default/> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
97 <context>http</context> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
98 <context>server</context> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
99 <context>location</context> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
100 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
101 <para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
102 Устанавливает <value>переменную</value> в запросе в заданное |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
103 <value>значение</value> после завершения запроса авторизации. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
104 Значение может содержать переменные из запроса авторизации, |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
105 например, <var>$upstream_http_*</var>. |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
106 </para> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
107 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
108 </directive> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
109 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
110 </section> |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
111 |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
diff
changeset
|
112 </module> |