我在 apache 错误日志中看到成千上万条“文件不存在”的错误信息。奇怪的是,引用者是我的网站,当你查看源代码时,却没有 /images 的 URL 请求。
这可能是什么原因造成的?
[Sun Aug 28 03:15:31 2011] [error] [client 2.219.154.210] File does not exist: /var/www/oneclickrecruitment/public/jobs, referer: http://www.oneclickrecruitment.co.uk/jobs/construction-and-skilled-trades/electricians-and-part-qualified-electricians/
[Sun Aug 28 04:06:28 2011] [error] [client 207.46.12.121] File does not exist: /var/www/oneclickrecruitment/public/images, referer: http://www.oneclickrecruitment.co.uk/employers
这里最大的问题是我使用 apache-noscript 设置了 fail2ban,这意味着无辜的用户仅仅因为查看网站就会被阻止。
编辑:每次访问我都会收到上述错误。因此,请告诉我悬赏帮助我解决这个问题的原因。
<VirtualHost *:80>
ServerName oneclickrecruitment.co.uk
ServerAlias www.oneclickrecruitment.co.uk www.oneclickrecruitment.com www.1clickrecruitment.co.uk www.1clickrecruitment.com
DocumentRoot /var/www/oneclickrecruitment/public
ErrorLog /var/log/apache2/oneclickrecruitment-error.log
LogLevel warn
CustomLog /var/log/apache2/oneclickrecruitment-access.log combined
</VirtualHost>
# Redirect for non existent subdomains
<VirtualHost *:80>
ServerAlias *.oneclickrecruitment.co.uk *.oneclickrecruitment.com *.1clickrecruitment.co.uk *.1clickrecruitment.com
Redirect 301 / http://www.oneclickrecruitment.co.uk
</VirtualHost>
答案1
我浏览了您的一些页面并发现了可能相关的 404 错误。
它位于你的 HTML 标头中:
<link rel="apple-touch-icon" href="/webapp/templates/default/images/apple-icon.png" />
我想知道这是否就是映射到/var/www/oneclickrecruitment/public/images
我查看了第一页的错误.../public/jobs
,但未在该目录中看到任何媒体错误。我会继续查找。
答案2
您的网站代码中有两个损坏的图像链接(对于您在问题中提供的网址),它们是,
http://www.oneclickrecruitment.co.uk/webapp/templates/default/images/application_links.jpg
http://www.oneclickrecruitment.co.uk/webapp/templates/default/images/input.png
您能否纠正这些问题并检查问题是否仍然存在。
答案3
相对包含资源?例如:“../images”