-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDIRECTIVES
More file actions
270 lines (209 loc) · 10.2 KB
/
DIRECTIVES
File metadata and controls
270 lines (209 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
All the directives understood by this version of mod-websocket are listed
below. All directives exist in the two forms Auth_MySQL_* and AuthMySQL_*
and share the same semantics. They are the result of merging two separate
versions of the mod_auth_mysql in the first place, both of which had subtly
different usage symantics. The directive names have since then unified.
Auth_MySQL <on/off>
Enable/disable MySQL authentication
Auth_MySQL_Info <host> <user> <password>
Server-wide config option to specify the database host, username,
and password used to connect to the MySQL server.
This option affects all directories which do not override it via
Auth_MySQL_Host, Auth_MySQL_User, and/or Auth_MySQL_Password.
Auth_MySQL_DefaultHost <hostname>
Specifies the MySQL server to use for authentication.
This option affects all directories which do not override it via
Auth_MySQL_Host.
Auth_MySQL_Host <hostname>
Synonym for Auth_MySQL_DefaultHost, to be used in .htaccess files and
directory-specific entries.
Auth_MySQL_DefaultPort <portnum>
Specifies a port to use to talk to a MySQL server. If left empty,
the default (3306) will be used.
This option affects all directories which do not override it via
Auth_MySQL_Port.
Auth_MySQL_Port <portnum>
Synonym for Auth_MySQL_DefaultPort, to be used in .htaccess files and
directory-specific entries.
Auth_MySQL_DefaultSocket <socketname>
If using a local MySQL server, you can specify a non-default named
pipe to use instead of the default pipe name compiled into your MySQL
client library.
This option affects all directories which do not override it via
Auth_MySQL_Socket.
Auth_MySQL_Socket <socketname>
Synonym for Auth_MySQL_DefaultSocket, to be used in .htaccess files and
directory-specific entries.
Auth_MySQL_DefaultUser <username>
Specifies the username for connection to the MySQL server.
Auth_MySQL_User <username>
Synonym for Auth_MySQL_DefaultUser, to be used in .htaccess files and
directory-specific entries.
Auth_MySQL_Username <username>
Synonym for Auth_MySQL_User.
Auth_MySQL_DefaultPassword <password>
Specifies the password user together with the above user.
Auth_MySQL_Password <password>
Synonym for Auth_MySQL_DefaultPassword, to be used in .htaccess files
and directory-specific entries.
Auth_MySQL_General_DB <database_name>
Server-wide, specifies a default database name to use.
Auth_MySQL_DB <database_name>
Synonym for Auth_MySQL_General_DB, to be used in .htaccess files and
directory-specific entries.
Auth_MySQL_DefaultDB <database_name>
Synonym for Auth_MySQL_General_DB.
Auth_MySQL_CharacterSet <character set>
Set the connection character set to the specified one. Otherwise no
particular character set is used when the connection is created.
This could cause problems with differently encoded strings and table
or column collations. The parameter must be a valid MySQL
character. It is mandatory if the character set used for tables/rows
differs from the default.
AuthMySQL_CharacterSet <character set>
Synonym for Auth_MySQL_CharacterSet.
AuthName "<Realm>"
Describes the data you're guarding.
AuthType <type>
The authentication process used in the transaction. Stick with
Basic, no others work at present.
require <type> <identifier(s)>
Specify what is considered a valid authentication. <type> can be
either user, group, or valid-user. valid-user is the simplest -
anyone who gets the username and password right gets in. Otherwise,
the user must either have a username in the space-separated list of
identifiers (if using user) or must be a member of a group in the
list of identifiers (if user group).
Multiple require statements are allowed; if multiple require
statements are present in a configuration, then the user will be
considered authenticated if they can satisfy any of the require
statements supplied.
Auth_MySQL_Password_Table <password_table_name>
The name of the MySQL table in the specified database which stores
username:password pairs. By default, it is 'mysql_auth'.
Auth_MySQL_Group_Table <group_table_name>
As per ...Password_Table above, stores username:group pairs.
Normally you'll store username:password:group triplets in the one
table, but we are nothing if not flexible. Defaults to
'mysql_auth'.
Auth_MySQL_Username_Field <username_field_name>
The name of the field which stores usernames. Defaults to
'username'. The username/password combo specified in Auth_MySQL_Info
must have select privileges to this field in the Password and Group
tables.
Auth_MySQL_Secondary_Username_Field <username_field_name>
The name of the field storing the secondary part of the usernames.
Defaults to '' (in which case secondary usernames are not used).
If the secondary username is set, then the username supplied by
apache is split around a '/' character, with the portion on the left
being used as the primary username (compared against the field
set by Auth_MySQL_Username_Field) and the portion on the right
being used as the secondary username (compared against the field
set by the Auth_MySQL_Secondary_Username_Field).
The username/password combo specified in Auth_MySQL_Info
must have select privileges to this field in the Password and Group
tables.
Auth_MySQL_Password_Field <password_field_name>
As per ...Username_Field above, but for passwords. Same MySQL
access privileges. Defaults to 'passwd'.
AuthMySQL_Password_Field <password_field_name>
Synonym for Auth_MySQL_Password_Field.
Auth_MySQL_Group_Field <group_field_name>
As per ...Username_Field above. Defaults to 'groups'. The query
will use FIND_IN_SET(<group_name>,<group_field_name>).
Auth_MySQL_Group_User_Field <field_name>
The name of the field in the groups table which stores the username.
Defaults to the field name specified for usernames in the passwords
table.
AuthMySQL_Group_User_Field <field_name>
Synonym for Auth_MySQL_Group_User_Field.
Auth_MySQL_Password_Clause <SQL fragment>
Adds arbitrary clause to username:password matching query, for example:
" AND Allowed=1". Clause has to start with space. Default is empty.
Auth_MySQL_Group_Clause <SQL fragment>
Adds arbitrary clause to username:group matching query, for example:
" AND Allowed=1". Clause has to start with space. Default is empty.
Auth_MySQL_Where_Clause <SQL fragment>
Synonym for Auth_MySQL_Password_Clause.
Auth_MySQL_Empty_Passwords <on/off>
Whether or not to allow empty passwords. If the password field is
empty (equals to '') and this option is 'on', users would be able to
access the page by just specifying their username WITHOUT ANY
PASSWORD CHECKING. If this is 'off', they would be denied access.
Default: 'on'.
Auth_MySQL_Encryption_Types <type_list>
Select which types of encryption to check, and in which order to
check them. It overrides the legacy Auth_MySQL_Scrambled_Passwords
and Auth_MySQL_Encrypted_Passwords directives. Multiple encryption
types may be specified, to instruct the module to check each
password in multiple encryption schemes - a useful feature for
legacy transitions. For example:
Auth_MySQL_Encryption_Types Plaintext Crypt_DES
Would instruct the module to do a direct comparison of the entered
password with the contents of the password field, and if that fails,
to do a DES crypt() check, a la Unix password handling.
The available encryption types supported at this time are:
Plaintext
Pretty self-explanatory. Not recommended.
Crypt_DES
Check the password via the standard Unix crypt() call, using
DES hashing.
Crypt_MD5
Check the password via the standard Unix crypt() call, using
an MD5 hash.
Crypt
Check the password via the standard Unix crypt() call,
without preference for the hashing scheme employed. This is
the generally preferred means of checking crypt()ed
passwords, because it allows you to use other schemes which
may be available on your system, such as blowfish.
PHP_MD5
Compares with an MD5 hash, encoded in the way that PHP and
MySQL handle MD5 hashes - 32 character hex code, with
lowercase letters.
SHA1Sum
Compares with a SHA1 hash, encoded the way that MySQL, PHP,
and the sha1sum command produce their output (a 40 character
lowercase hex representation).
MySQL
The hashing scheme used by the MySQL PASSWORD() function.
MySQL_OLD
The hashing scheme used by the MySQL PASSWORD() function
in ancient versions of MySQL (pre-3.2.3)
Apache
The hashing scheme used by htpasswd utility. Compatible to
authuserfile.
Auth_MySQL_Encrypted_Passwords <on/off> (DEPRECATED)
Equivalent to: Auth_MySQL_Encryption_Types Crypt_DES
Only used if ...Encryption_Types is not set. Defaults to 'on'. If
both this option and ...Scrambled_Passwords are 'off' and
...Encryption_Types is not set, passwords are expected to be in
plaintext.
Auth_MySQL_Scrambled_Passwords <on/off> (DEPRECATED)
Equivalent to: Auth_MySQL_Encryption_Types MySQL
The same restrictions apply to this directive as to
...Encrypted_Passwords.
Auth_MySQL_Authoritative <on/off>
Whether or not to use other authentication schemes if the user is
successfully authenticated. That is, if the user passes the MySQL
authentication, they may still be rejected by a later module if this
option is set 'off'. The default is 'on' (i.e. if the user passes
the MySQL module, they're considered OK).
Auth_MySQL_Non_Persistent <on/off>
If set to 'on', the link to the MySQL server is explicitly closed
after each authentication request. Note that I can't think of any
possible good reason to do this, unless your platform makes MySQL go
crazy when it has plenty of simultaneous threads (bad handling of
file descriptors may cause that). In my opinion, one should
increase the maximum number of simultaneous threads in MySQL and
keep this option off. Default: off, and for good reason.
Auth_MySQL_Persistent <on/off>
An antonym for Auth_MySQL_Non_Persistent.
Auth_MySQL_AllowOverride <on/off>
Whether or not .htaccess files are allowed to use their own
Host/User/Password/DB specifications. If set to 'off', then the
defaults specified in the httpd.conf cannot be overridden.
Auth_MYSQL <on/off>
Whether or not to enable MySQL authentication. If it's off, the
MySQL authentication will simply pass authentication off to other
modules defined.