当它不起作用时,就好像Apache已经确定index.HTML文件不存在所以尝试提供目录列表,但我们的配置故意拒绝这样做.
Apache virtualhost特定错误日志包含以下条目:
[Tue Aug 09 03:10:47 2011] [error] [clIEnt 66.249.72.3] Directory index forbIDden by Options directive: /main/directory/
Apache一般错误日志不包含任何内容
Apache virtualhost特定访问日志包含以下条目:
66.249.72.3 - - [09/Aug/2011:03:10:47 +0100] "GET / http/1.1" 403 230 "-" "SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.Google.com/bot.HTML)"
总体分布:
# fgrep 'GET / ' `ls -tr domain-access_log*` | cut -d ' ' -f 9 | sort | uniq -c 1339 200 1 206 31 304 29 403
Apache配置看起来像lke:
<VirtualHost ip.address:80> Servername domain.here documentRoot /main/directory ErrorLog logs/domain-error_log CustomLog logs/domain-access_log combined DirectoryIndex index.HTML AliasMatch ^/(robots\.txt|sitemap.*\.xml(?:\.gz)?)$/other/directory/ CacheEnable disk / Cachedisable /sitemap.xml.gz Cachedisable /robots.txt CacheIgnoreheaders Set-cookie CacheIgnoreNolastMod On AddOutputFilterByType DEFLATE text/HTML text/plain text/xml text/CSS application/x-JavaScript <Directory /main/directory> Options Includes AddOutputFilter INCLUDES .HTML Order allow,deny Allow from all </Directory> <Directory /other/directory> Order allow,deny Allow from all </Directory></VirtualHost>解决方法 由于这是一个虚拟站点,我们还必须考虑httpd.conf级别的设置…您是否在任何地方设置了选项多视图? SSI加语言协商可能导致它尝试提供不存在的index.HTML备用版本.然后同样的事情可能导致它无法找到它想要的Errordocument并给你更奇怪的结果.
是否有较低级别的重写?
旧您包含的日志行是手机浏览器.您是否有处理移动Web浏览器的其他Apache处理?你在http_USER_AGENT上做任何匹配的重写并在其他地方发送请求吗?
总结以上是内存溢出为你收集整理的linux – Apache Web服务器间歇性地服务403:“Options指令禁止的目录索引”和304全部内容,希望文章能够帮你解决linux – Apache Web服务器间歇性地服务403:“Options指令禁止的目录索引”和304所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)