目录访问权限

输入用户名、密码后方可访问home目录下的文件:

httpd.conf
<Directory "D:/software/wwwroot/home">
    Options -Indexes MultiViews                #-Indexes 禁止目录索引
    AllowOverride AuthConfig
    Order Deny,Allow
    Allow from all
    Options All
    AllowOverride All
</Directory>

在home目录下放置.htaccess文件

.htaccess
authtype basic
authname "Please input the invitation code"        #输入框提示信息
authuserfile D:/software/wwwroot/home/.htpasswd    #指定用户名、密码文件存放位置
require valid-user

相关文章:

  • 2022-12-23
  • 2021-08-21
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2021-04-14
  • 2022-12-23
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-05-05
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案