Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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
Windows 此处不允许htaccess AuthType,500内部服务器错误_Windows_Apache_Overriding - Fatal编程技术网

Windows 此处不允许htaccess AuthType,500内部服务器错误

Windows 此处不允许htaccess AuthType,500内部服务器错误,windows,apache,overriding,Windows,Apache,Overriding,我需要配置.htaccess文件以覆盖auth设置 但是,我不断得到“此处不允许使用AuthType” 我看不出我做错了什么。我已经遵循了上提供的步骤,并尝试了谷歌的一些解决方案,但我无法消除这个错误 当我转到http://localhost/test2我收到一个500内部服务器错误。在日志中显示“此处不允许使用AuthType” 这是我的配置httpd.conf: <Directory C:/apache24/htdocs/test2> Options Indexes AllowO

我需要配置
.htaccess
文件以覆盖
auth
设置

但是,我不断得到
“此处不允许使用AuthType”

我看不出我做错了什么。我已经遵循了上提供的步骤,并尝试了谷歌的一些解决方案,但我无法消除这个错误

当我转到
http://localhost/test2
我收到一个
500内部服务器错误
。在日志中显示“此处不允许使用AuthType”

这是我的配置
httpd.conf

<Directory C:/apache24/htdocs/test2>
Options Indexes
AllowOverride All
</Directory>
我的
httpd.conf
文件包含所有必需的模块,因为如果我直接通过httpd.conf文件配置它,它确实可以工作,但是因为这是学校,老师希望我们使用
.htaccess
。当我直接在
httpd.conf


有人看到我错过了什么吗?提前谢谢

尝试将
AuthType
放入
部分()我从.htaccess中删除了AuthType并将其放入目录部分,我仍然会得到用于验证整个
.htaccess
的相同结果。还可以尝试运行
apachectl configtest
。我想知道您的错误是否来自另一个
apache
config,而不是
.htaccess
?!?尝试将
AuthType
放入
部分()我从.htaccess中删除了AuthType并将其放入目录部分,我仍然会得到用于验证整个
.htaccess
的相同结果。还可以尝试运行
apachectl configtest
。我想知道您的错误是否来自另一个
apache
config,而不是
.htaccess
?!?
AuthType basic
AuthName "Only for teachers"
AuthGroupFile C:/apache24/auth_groups
AuthUserFile C:/apache24/auth_users
Require group teachers