.


:




:

































 

 

 

 





web- , ( HTTP/1.1) . (basic) - . , ( ). (digest) , . MD5, .

 

:

 
 

 

 


  1. , URL, -.
  2. Web- 401 WWW-Authenticate, , . WWW-Authenticate .
  3. Web-, .
  4. , 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.

  1. . , -c htpasswd:

 

htpasswd /otherdir/.htpasswd peanuts
htpasswd /otherdir/.htpasswd almonds
htpasswd /otherdir/.htpasswd walnuts

 

  1. , , , /otherdir/.htgroup :

 

my-users: pumpkin peanuts almonds walnuts

 

my-users - , pumpkin, peanuts, almonds, walnuts - , .

  1. .htaccess :

 

AuthUserFile /otherdir/.htpasswd
AuthGroupFile /otherdir/.htgroup
AuthName ByPassword
AuthType Basic
<Limit GET>
require group my-users
</Limit>

 

my-users ( ).





:


: 2015-10-06; !; : 338 |


:

:

80% - .
==> ...

1786 - | 1640 -


© 2015-2024 lektsii.org - -

: 0.011 .