自从我使用Apache httpd Web服务器以来已经有一段时间了.我正在为一个项目启动本地服务器,当我尝试请求localhost/index.html时,我收到500错误,我在错误日志中看到了这个:
[Tue Jan 21 09:23:58 2014] [crit] [client ::1] configuration error: couldn't perform authentication. AuthType not set!: /index.html
[Tue Jan 21 09:23:58 2014] [error] an unknown filter was not added: DEFLATE
[Tue Jan 21 09:23:58 2014] [crit] [client ::1] configuration error: couldn't perform authentication. AuthType not set!: /favicon.ico
Run Code Online (Sandbox Code Playgroud)
看起来apache配置中可能存在2个错误,其中一个与"AuthType未设置!"有关.可能还有一个与"过滤器没有添加:DEFLATE"有关.我不知道这些意味着什么或从哪里开始挖掘.
一个基本的谷歌搜索显示这个链接,表明罪魁祸首可能是"需要所有授予".我的httpd.conf中的这一行可能会涉及到.
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)
这个apache配置主要是在这个项目的生产中使用的,所以我知道这有效,但目前我的工作站上没有.这意味着什么,我接下来应该尝试什么?我确实尝试评论"需要所有授予"并重新启动apache但无济于事.
在这个SO问题之后,我还加载了mod_authz_host
LoadModule authz_host_module modules/mod_authz_host.so
Run Code Online (Sandbox Code Playgroud)
并添加"Allow from all",重新启动服务器.但问题仍然存在.deflate问题似乎是无关的,并且通过添加很容易解决
LoadModule deflate_module modules/mod_deflate.so
Run Code Online (Sandbox Code Playgroud)
问题仍然存在,如何解决这500错误? …
apache ×1