Apache 错误日志 - 文件不存在
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/548883/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apache error log - file does not exist
提问by user49226
I am receiving some mysterious errors in my apache error log. For example:
我在我的 apache 错误日志中收到了一些神秘的错误。例如:
File does not exist: /home/httpd/vhosts/studentlife.co.il/httpdocs/help_center/div.hot-jobs
File does not exist: /home/httpd/vhosts/studentlife.co.il/httpdocs/solutions/function.filesize
File does not exist: /home/httpd/vhosts/studentlife.co.il/httpdocs/work_abroad/div.publish
Now I don't understand - how did my divs and functions suddenly turn into files?? Of course they do not exist, they are divs and functions written in the code. So I am not sure why I am getting these file does not exist errors.
现在我不明白 - 我的 div 和函数是怎么突然变成文件的??当然它们不存在,它们是代码中编写的div和函数。所以我不确定为什么我会收到这些文件不存在的错误。
Also, how can I debug this, since in no place am I trying to access files with these names?
另外,我如何调试这个,因为我在任何地方都没有尝试访问具有这些名称的文件?
Any insight will be great.
任何见解都会很棒。
回答by Gareth
I would say don't worry about it.
我会说别担心。
I can make a request for /the/answer/to/life/the/universe/and/everything.42and it would show up in your error log.
我可以提出请求/the/answer/to/life/the/universe/and/everything.42,它会显示在您的错误日志中。
Probably some spider is hunting for vulnerabilities in your site and it's randomly trying URLs. If you see the same pages a lotthen start checking to see whether you have any broken links, otherwise forget about it.
可能某些蜘蛛正在寻找您网站中的漏洞,并且它会随机尝试 URL。如果你看到同样的页面很多然后开始检查,看看是否有任何损坏的链接,否则忘掉它。
回答by Node
回答by marquito
I had this same issue in this scenario:
在这种情况下,我遇到了同样的问题:
- wamp installation
- system was running perfectly til dec 01/2010.
- restarted computer on dec 02/2010.
- apache wouldn't start up and was logging [Thu Dec 02 09:15:45 2010] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/announce
- wamp安装
- 系统一直运行到 2010 年 12 月 1 日。
- 2010 年 12 月 2 日重新启动计算机。
- apache 无法启动并且正在记录 [Thu Dec 02 09:15:45 2010] [error] [client 127.0.0.1] 文件不存在:C:/wamp/www/announce
then, only then, I reminded myself I had just installed SKYPE on dec 01/2010 and that, on windows, we've got this conflict between the phone program and apache fighting for the port 80, I guess.
然后,直到那时,我才提醒自己我刚刚在 2010 年 12 月 1 日安装了 SKYPE,并且在 Windows 上,我们在电话程序和争夺端口 80 的 apache 之间发生了冲突,我猜。
closed Skype, restarted services and voi là: my system is back. =)
关闭 Skype,重新启动服务,瞧:我的系统又回来了。=)
回答by Artur K?dzior
One of my clients had a similar issue with Apache on Windows. On any request he was getting:
我的一位客户在 Windows 上遇到了类似的 Apache 问题。他得到的任何请求:
[error] [client 192.168.1.66] File does not exist: D:/apache
I realized that the DocumentRootwas missing form the httpd.conf.
我意识到,DocumentRoot缺少的形式httpd.conf。
回答by oabarca
I agree with Gareth, a spider could be hunting for vulnerabilities in your site and it's randomly trying URLs. However, there may be another reason, probably more likely.
我同意 Gareth 的观点,蜘蛛可能正在寻找您网站中的漏洞,并且它会随机尝试 URL。然而,可能还有另一个原因,可能更有可能。
After debugging my own scripts to see what was going on, I noticed the following. The error of the form:
在调试了我自己的脚本以查看发生了什么之后,我注意到了以下内容。表格错误:
[Mon May 06 21:47:29 2013] [error] [client ip] File does not exist: /path/, referer: http://domain/example.html
is visible in the error log and even though it will sound weird, it does not have to do with the static HTML file or script that generates the page. In fact, the source of this problem may be the HTML of the page referencing a broken link to an image/css/js file, so that when the browser receives the HTML and fetches these resources Apache can't find them and prints the "File Does Not Exist" error.
在错误日志中可见,尽管听起来很奇怪,但它与生成页面的静态 HTML 文件或脚本无关。实际上,这个问题的根源可能是页面的 HTML 引用了一个指向 image/css/js 文件的损坏链接,因此当浏览器收到 HTML 并获取这些资源时,Apache 找不到它们并打印“文件不存在”错误。
It is nice of Apache as it warns us about broken links.
Apache 很好,因为它会警告我们有关断开的链接。

