這裏的.htaccess文件的相關部分:自定義錯誤頁401
AuthUserFile /var/www/mywebsite/.htpasswd
AuthGroupFile /dev/null
AuthName protected
AuthType Basic
Require valid-user
ErrorDocument 400 /var/www/errors/index.html
ErrorDocument 401 /var/www/errors/index.html
ErrorDocument 403 /var/www/errors/index.html
ErrorDocument 404 /var/www/errors/index.html
ErrorDocument 500 /var/www/errors/index.html
Docuement根設置到/ var/WWW/mywebsite /網絡,這是許多虛擬主機的。我可以導航到index.html頁面。
我看到的全部是通用的Apache 401頁面,任何想法。
編輯:這是我的瀏覽器的錯誤信息:
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
Additionally, a 401 Authorization Required error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch Server at www.dirbe.com Port 80
不幸。沒有任何錯誤日誌。我在錯誤頁面上看到了這一點:「此外,嘗試使用ErrorDocument來處理請求時遇到401需要授權錯誤。」 – 2010-12-03 00:32:17
嘗試在 部分中放入您需要的授權線路。 –
2010-12-03 00:58:15