注意到在 DBA Wiki 的 Apache Error Log 里面有这样一条信息频繁出现:
http:[Thu Feb 12 22:16:11 2006] [notice] cannot use a full URL in a 401 ErrorDocument directive ---ignoring
在 bin 目录下的 .htaccess 我定义了 401 错误的重定向.检查了一下.原来 Apache 下不能用 URL 路径.必须要本地路径才可以.修改为如下:
# File to return on access control error (e.g. wrong password) # By convention this is the TWikiRegistration page, that allows users # to register with the TWiki. Apache requires this to be a *local* path. ErrorDocument 401 /bin/view/TWiki/TWikiRegistration
修改之后该错误不再出现.记录一下.或许对别人也有用.
Google+
本文介绍了一种常见的Apache配置错误——使用全URL而非本地路径定义401错误页面,导致Apache无法正确处理认证错误的情况。通过修改.htaccess文件中的ErrorDocument指令,将全URL替换为本地路径,解决了频繁出现的警告信息。


被折叠的 条评论
为什么被折叠?



