Apache 报错: couldn't perform authentication. AuthType not set!: /

使用 Apache 的虚拟机服务,出现 500 internal error。查看 error_log,看到如下报错内容:

 [crit] [client 119.136.114.3] configuration error:  couldn't perform authentication. AuthType not set!:

conf.d/httpd-vhost.conf 中 vhost 配置的内容如下:

<VirtualHost *:80>
        ServerName azon.baidu.dec
        #DocumentRoot D:/wamp64/www
        DocumentRoot /home/www/default/azon
        <Directory  "/home/www/default/azon">
                Options +Indexes +Includes +FollowSymLinks +MultiViews
                AllowOverride All
                Require all granted
        </Directory>
</VirtualHost>

搜索问题,寻找解决时,发现 “Require all granted” 指令只能用于 Apache 2.4。

httpd -v ,发现自己在使用的是 Apache 2.2.

Server version: Apache/2.2.15 (Unix)
Server built:   Oct 16 2014 14:48:21

只需要将 Require all granted 替换为如下内容即可:

Order allow,deny
Allow from all

参考文章 #1
参考文章 #2

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容