Apache错误日志-文件不存在

发布于 2024-07-13 20:03:36 字数 501 浏览 10 评论 0原文

我的 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 

现在我不明白——我的div和函数怎么突然变成了文件? 当然它们并不存在,它们是写在代码中的div和函数。 所以我不确定为什么会收到这些文件不存在错误。

另外,我如何调试这个,因为我在任何地方都没有尝试访问具有这些名称的文件?

任何见解都会很棒。

I am receiving some mysterious errors in my apache error log.
For example:

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.

Also, how can I debug this, since in no place am I trying to access files with these names?

Any insight will be great.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

明明#如月 2024-07-20 20:03:36

我想说不用担心。

我可以请求 /the/answer/to/life/the/universe/and/everything.42 ,它会显示在您的错误日志中。

可能某些蜘蛛正在寻找您网站中的漏洞,并且它会随机尝试 URL。 如果您多次看到相同的页面,请开始检查是否有任何损坏的链接,否则就忘记它。

I would say don't worry about it.

I can make a request for /the/answer/to/life/the/universe/and/everything.42 and it would show up in your error log.

Probably some spider is hunting for vulnerabilities in your site and it's randomly trying URLs. If you see the same pages a lot then start checking to see whether you have any broken links, otherwise forget about it.

2024-07-20 20:03:36

您可以使用 FireBug 查看返回代码(您正在寻找 404)当您打开网站时发出的所有 HTTP 请求。 也许您的 HTML 中有一些拼写错误。

You could use FireBug to see the return codes (you are looking for 404) of all HTTP requests made when you open your website. Maybe you have some typo in your HTML.

秋千易 2024-07-20 20:03:36

在这种情况下,我遇到了同样的问题:

  1. wamp 安装
  2. 系统一直运行良好,直到 2010 年 12 月 1 日。
  3. 于 2010 年 12 月 2 日重新启动计算机。
  4. apache 不会启动并正在记录 [Thu Dec 02 09:15:45 2010] [error] [client 127.0.0.1] 文件不存在:C:/wamp/www/announce

然后,只有那时,我提醒自己我刚刚在 2010 年 12 月 1 日安装了 SKYPE,在 Windows 上,我们在电话程序和 apache 之间争夺端口 80 时遇到了冲突,我猜。

关闭 Skype,重新启动服务,瞧:我的系统又回来了。 =)

I had this same issue in this scenario:

  1. wamp installation
  2. system was running perfectly til dec 01/2010.
  3. restarted computer on dec 02/2010.
  4. 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

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.

closed Skype, restarted services and voi là: my system is back. =)

猫烠⑼条掵仅有一顆心 2024-07-20 20:03:36

我的一位客户在 Windows 上使用 Apache 时也遇到了类似的问题。
对于他收到的任何请求:

[error] [client 192.168.1.66] File does not exist: D:/apache

我意识到 httpd.conf 中缺少 DocumentRoot

One of my clients had a similar issue with Apache on Windows.
On any request he was getting:

[error] [client 192.168.1.66] File does not exist: D:/apache

I realized that the DocumentRoot was missing form the httpd.conf.

原来分手还会想你 2024-07-20 20:03:36

我同意 Gareth 的观点,蜘蛛可能正在寻找您网站中的漏洞,并且它会随机尝试 URL。 然而,可能还有另一个原因,而且可能性更大。

在调试我自己的脚本以查看发生了什么之后,我注意到以下内容。 形式的错误:

[Mon May 06 21:47:29 2013] [error] [client ip] File does not exist: /path/, referer: http://domain/example.html

在错误日志中可见,尽管听起来很奇怪,但它与生成页面的静态 HTML 文件或脚本无关。 事实上,这个问题的根源可能是页面的 HTML 引用了指向 image/css/js 文件的损坏链接,因此当浏览器收到 HTML 并获取这些资源时,Apache 无法找到它们并打印“文件不存在”错误。

Apache 很好,因为它会警告我们有关损坏的链接。

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.

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.

It is nice of Apache as it warns us about broken links.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文