comparison xml/en/docs/http/ngx_http_auth_basic_module.xml @ 315:e00f8f8c0486

Translated ngx_http_access_module, ngx_http_addition_module, ngx_http_auth_basic_module, ngx_http_autoindex_module, and ngx_http_browser_module into English.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 13 Jan 2012 18:05:01 +0000
parents
children a4fa80755eab
comparison
equal deleted inserted replaced
314:95d5dc7c9884 315:e00f8f8c0486
1 <?xml version="1.0"?>
2
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
4
5 <module name="Module ngx_http_auth_basic_module"
6 link="/en/docs/http/ngx_http_auth_basic_module.html"
7 lang="en">
8
9 <section id="summary">
10
11 <para>
12 The <literal>ngx_http_auth_basic_module</literal> module allows
13 to limit access to resources by validating the user name and password
14 using the “HTTP Basic Authentication” protocol.
15 </para>
16
17 </section>
18
19
20 <section id="example" name="Example Configuration">
21
22 <para>
23 <example>
24 location / {
25 auth_basic "closed site";
26 auth_basic_user_file conf/htpasswd;
27 }
28 </example>
29 </para>
30
31 </section>
32
33
34 <section id="directives" name="Directives">
35
36 <directive name="auth_basic">
37 <syntax><value>string</value> | <literal>off</literal></syntax>
38 <default>off</default>
39 <context>http</context>
40 <context>server</context>
41 <context>location</context>
42 <context>limit_except</context>
43
44 <para>
45 Enables validation of user name and password using the
46 “HTTP Basic Authentication” protocol.
47 The specified parameter is used as a <value>realm</value>.
48 The parameter <literal>off</literal> allows to cancel the effect of the
49 <literal>auth_basic</literal> directive inherited from the previous
50 configuration level.
51 </para>
52
53 </directive>
54
55
56 <directive name="auth_basic_user_file">
57 <syntax><value>file</value></syntax>
58 <default/>
59 <context>http</context>
60 <context>server</context>
61 <context>location</context>
62 <context>limit_except</context>
63
64 <para>
65 Specifies a file that keeps user names and passwords,
66 in the following format:
67 <example>
68 # comment
69 name1:password1
70 name2:password2:comment
71 name3:password3
72 </example>
73 </para>
74
75 <para>
76 Passwords should be encrypted with the <c-func>crypt</c-func> function.
77 The <command>htpasswd</command> command from the Apache web server
78 distribution can be used to create such a file.
79 </para>
80
81 </directive>
82
83 </section>
84
85 </module>