开发者

.htaccess password protection for specific domain

开发者 https://www.devze.com 2023-03-05 12:31 出处:网络
Is there a way to require a htaccess login only for a specific domain? I\'m using Drupal and it is set up as a multisite installation but only one site is supposed to be protecte开发者_如何学Pythond.Y

Is there a way to require a htaccess login only for a specific domain? I'm using Drupal and it is set up as a multisite installation but only one site is supposed to be protecte开发者_如何学Pythond.


You can do that using the Secure Site module: http://drupal.org/project/securesite

It allows you to protect a site using HTTP basic authorization. The usernames and passwords will be from the Drupal users table, rather than a separate htpassword file.

In Apache configuration (either htaccess or httpd.conf) the AuthType is always tied to the directory. I don't think you can tie the authorization to named virtual host just with Apache configuration.

0

精彩评论

暂无评论...
验证码 换一张
取 消