web- , ( HTTP/1.1) . (basic) - . , ( ). (digest) , . MD5, .
:
- , URL, -.
- Web- 401 WWW-Authenticate, , . WWW-Authenticate .
- Web-, .
- , URL . .
5. ) , .
) , 401 WWW-Authenticate.
, 401 .
. , AccessFileName . , .htaccess.
.htaccess
AuthUserFile /otherdir/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic
<Limit GET>
require user pumpkin
</Limit>
AuthUserFile , .
Limit GET GET, pumpkin. (, CGI) :
<Limit GET POST PUT>
require user pumpkin
</Limit>
htpasswd, :
htpasswd -c /otherdir/.htpasswd pumpkin
pumpkin /otherdir/.htpasswd.
-.
/
/ , , Limit.
|
|
- . , -c htpasswd:
htpasswd /otherdir/.htpasswd peanuts
htpasswd /otherdir/.htpasswd almonds
htpasswd /otherdir/.htpasswd walnuts
- , , , /otherdir/.htgroup :
my-users: pumpkin peanuts almonds walnuts
my-users - , pumpkin, peanuts, almonds, walnuts - , .
- .htaccess :
AuthUserFile /otherdir/.htpasswd
AuthGroupFile /otherdir/.htgroup
AuthName ByPassword
AuthType Basic
<Limit GET>
require group my-users
</Limit>
my-users ( ).