黑帽联盟

 找回密码
 会员注册
查看: 1778|回复: 0

[基础服务] Apache 报错: couldn't perform authentication. AuthType not set!: /

[复制链接]

302

主题

18

听众

1008

积分

管理员

Rank: 9Rank: 9Rank: 9

  • TA的每日心情
    开心
    2026-7-7 22:30
  • 签到天数: 406 天

    [LV.9]以坛为家II

    使用 Apache 的虚拟机服务,出现 500 internal error。查看 error_log,看到如下报错内容:
    1. [crit] [client 119.136.114.3] configuration error:  couldn't perform authentication. AuthType not set!:
    复制代码
    conf.d/httpd-vhost.conf 中 vhost 配置的内容如下:
    1. <VirtualHost *:80>
    2.         ServerName web1.cnblackhat.com
    3.         ProxyVia on
    4.         ProxyRequests Off
    5.         ProxyPreserveHost On
    6.         <Proxy>
    7. Require all granted
    8.         </Proxy>
    9.         ProxyPass / http://172.31.225.243:8080/
    10.         ProxyPassReverse / http://172.31.225.243:8080/
    11.         <Location />
    12. Require all granted
    13.         </Location>
    14. </VirtualHost>
    复制代码
    搜索问题,寻找解决时,发现 “Require all granted” 指令只能用于 Apache 2.4。

    httpd -v ,发现自己在使用的是 Apache 2.2.
    1. [root@node6 ~]# httpd -v
    2. Server version: Apache/2.2.15 (Unix)
    3. Server built:   Jun 19 2018 15:45:13
    复制代码
    只需要将 Require all granted 替换为如下内容即可:
    1. Order allow,deny
    2. Allow from all
    复制代码
    最后成功访问:
    2121.png

    您需要登录后才可以回帖 登录 | 会员注册

    发布主题 !fastreply! 收藏帖子 返回列表 搜索
    回顶部