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

Possible Duplicate:
Why servers error log states lots of file doesn't exist, but files are accessible and website works well

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

share|improve this question

migrated from stackoverflow.com Aug 18 '11 at 21:18

This question came from our site for professional and enthusiast programmers.

marked as duplicate by MikeyB, Chris S, MadHatter Feb 20 '12 at 20:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Question belongs to a webmaster forum, I can't see any link to programming here, therefore voted for migration. –  Ingo Aug 18 '11 at 9:32
    
Probably you're right, i worte it here thinking maybe it's .htaccess fault. Reposted it at Serversfault. –  Tim Aug 18 '11 at 10:00

1 Answer 1

If those are .htaccess rules as you said, please make sure Apachs is actually reading the .htaccess - this can be done for example by adding a line in your .htaccess like

deny from all

then trying to access the website.. if you can still connect, means that apache is NOT reading the .htaccess at all.

To make it readable, go to the /etc/httpd/conf/httpd.conf and change the AllowOverride and Options for the correspondent directory to allow parsing .htaccess files, all should go like knife in butter ;)

share|improve this answer

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