Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a server that hosts about 10 different web sites. I notice that for some of the web sites, I often get error messages in my Apache logs that look like this:

[Sun Sep 23 09:46:54 2012] [error] [client 211.154.213.122] File does not exist: /dir/dir/htdocs/nameOfSomeFileThatDoesNotExist

In a lot of cases, these File does not exist errors occur in directories that don't exist either.

If someone tries to access a page on my site that is in a directory that doesn't exist, then, as far as I can tell, they get a standard message in their browser that says:

The requested URL /nameOfSomeFileThatDoesNotExistwas not found on this server.

And that being the case, I can't see that this is really a threat or a problem. If someone comes to one of the domains on my server, types in a random page and gets a 404 message, why should I care? It looks like most of the requests are for pages that used to but don't exist anymore, and maybe the occasional fishing attempt for directories and their contents (all my directories have an index.html and shouldn't be able to be read as directories).

Is there any reason I should continue to be alerted in my Apache to when this happens? It seems to just cause a lot of noise in the logs, and I'm trying to streamline things a bit so that I can more clearly see errors of real significance.

Is it indicative of something wrong with the site structure? Since I don't seem to be getting this error from all sites on the server, I'm not sure if it's just certain sites getting these page requests or if there's a difference in how the sites are structured.

And lastly, assuming that I can safely ignore requests for pages and directories that don't exist, what is the best way to prevent them from flooding my logs? Do I just change the error reporting level or do I do something different in the way the site is handled?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Apache log files are a good source of information to the web server admin. These 404 (not found) errors may indicate several things like:

  1. Breaking attempts for possible misconfigured admin access.
  2. Mistyped URLs by user.
  3. Broken links in the website or other referring websites.
  4. Bad rewrite/redirect rules.
  5. etc...

The user-agent and IP address can sometimes give you a hint. For example, you can tell it is a breaking attempt if all requests within some period are coming from one IP and they are requesting some well-known URLs like /phpmyadmin and /phppgadmin.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.