1

we migrated our website onto VPS server (CentOS 5.6 + Plesk 9.5), everything works nice, but one strange thing that i noticed in Plesk, is error_log file, most of the time it filled up with hundreds entries like:

...
[Thu Aug 10 11:35:48 2011] [error] [client xx.xx.xx.xx] File does not exist: /var/www/vhosts/yourdomain.com/httpdocs/category1
[Thu Aug 10 11:35:48 2011] [error] [client xx.xx.xx.xx] File does not exist: /var/www/vhosts/yourdomain.com/httpdocs/category2
....

If i open those urls (ex. http://yourdomain.com/category2) in my web browser everything works well, no 404 error, headers response 200 so everything works as should and i see page that i wanted. But why log file see it as an error and states that file is not exist? Also i want to mention that "category1", "category2" is not physical directories, it's .htacess and mod_rewrite managed paths, so not real folders.

mod_rewrite seems not to properly tell to the log system that the request should not be considered as a 404 when it looks like a file/folder that doesn't exist physically but handled by mod_rewrite.

Any help is appreciated. Thank you.

Tim

Tim
  • 11
  • 1

1 Answers1

0

Try use the rewritelog directive to see what's happening:

 RewriteLog ~/tracefile.rewrite.log
 RewriteLogLevel 9
 RewriteEngine On

(Keep in mind you have to declare it before activating the RewriteEngine (which is logical)).

Olivier Pons
  • 612
  • 1
  • 5
  • 21
  • Thanks, i was done that and rewrite_log was mostly ok, sometimes (for the same problematic urls) it was showing 404 redirect to a document that we described at .htacess as: ErrorDocument 404 /errors/404.html and sometimes for same request it was rewriting everything ok. I removed ErrorDocument declaration at .htacess and no errors is shown at rewrite_log but error_log still shows same errors as before. – Tim Aug 21 '11 at 14:53
  • Maybe it's permission problem? (because we moved our website from another server and needed to renew permissions to folders of website on new server again) or may it be built in "Plesk Error documents" module cause? Any ideas? – Tim Aug 21 '11 at 14:53
  • Sorry I can't give you any other advice, I'm not *that* good with rewriterules =) – Olivier Pons Aug 22 '11 at 12:03