Apache http basic authentication?

2019-05-11 14:01发布

问题:

Is there some simple code that I can add to an .htaccess file or my virtual host file to enforce http basic auth?

回答1:

What about this ?

AuthUserFile /my/derectory/.htpasswd
Require valid-user
AuthName "Secured Access"
AuthType Basic

the interesting part for you is Require valid-user

But if you can, please provide more informations about why you have you tried to do ^^



标签: apache http