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] 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?


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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