谷动谷力

 找回密码
 立即注册
查看: 1082|回复: 0
打印 上一主题 下一主题
收起左侧

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

[复制链接]
跳转到指定楼层
楼主
发表于 2022-1-14 11:53:01 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Apache 报错: couldn't perform authentication. AuthType not set!: /解决



现象:

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

  1. couldn't perform authentication. AuthType not set!: /
复制代码


解决思路:

用命令: httpd -v 查看Apahce版本:
  1. Server version: Apache/2.2.15 (Unix)
  2. Server built:   Jun 19 2018 15:45:13
复制代码
我的服务器Apache版本是2.2.15


    然后查看httpd.conf中的代码:


  1. <VirtualHost *:80>
  2. DocumentRoot /www/web/bbs_sunsili_com/public_html
  3. ServerName bbs.sunsili.com
  4. ErrorDocument 400 /errpage/400.html
  5. ErrorDocument 403 /errpage/403.html
  6. ErrorDocument 404 /errpage/404.html
  7. ErrorDocument 503 /errpage/503.html
  8. </VirtualHost>
  9. <Directory /www/web/bbs_sunsili_com>
  10.     Options FollowSymLinks
  11.     AllowOverride All
  12.     Require all granted
  13. </Directory>
复制代码

解决方法:


    首先当然是找度娘:百度一下,说是发现  “Require all granted” 指令只能用于 Apache 2.4,我现在用的是Apache 2.2。     

    只需要将 Require all granted 替换一下:

  1. Order allow,deny (注意不要有空格,有空格会出错)
  2.     Allow from all
复制代码

还有说删除Require all granted, 也是可以的,不过会少一些属性




回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号|Sitemap

GMT+8, 2024-4-26 15:38 , Processed in 0.113403 second(s), 33 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表