Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
apache身份验证不起作用_Apache_.htaccess_Authentication - Fatal编程技术网

apache身份验证不起作用

apache身份验证不起作用,apache,.htaccess,authentication,Apache,.htaccess,Authentication,我试图实现apache身份验证,但在提供正确密码时出现以下错误 访问/webalizer/失败,原因:要求存在指令且没有权威处理程序 如果我给出了不正确的密码,它会显示我 用户testusr:“/webalizer/”的身份验证失败:密码不匹配 下面是我的apache配置 <Directory /var/www/html/webalizer> Order allow,deny AuthName "Authorized Users Only." AuthType Basic AuthU

我试图实现apache身份验证,但在提供正确密码时出现以下错误

访问/webalizer/失败,原因:要求存在指令且没有权威处理程序

如果我给出了不正确的密码,它会显示我

用户testusr:“/webalizer/”的身份验证失败:密码不匹配

下面是我的apache配置

<Directory /var/www/html/webalizer>
Order allow,deny
AuthName "Authorized Users Only."
AuthType Basic
AuthUserFile /etc/httpd/conf/.htpasswd
require valid-user
Satisfy Any
</Directory>

命令允许,拒绝
AuthName“仅限授权用户。”
AuthType Basic
AuthUserFile/etc/httpd/conf/.htpasswd
需要有效用户
满足任何
apache正在使用apache用户运行,以下是htpasswd的文件权限

-rw-r--r--1apacheapache46 11月2日14:46/etc/httpd/conf/.htpasswd

我错过了什么


操作系统是AWS linux实例

尝试添加
AuthBasicProvider文件
,以确保使用了基于文件的身份验证。我已经添加了此项,但仍然存在相同的问题。