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.

The following URLs work well if I visit them with browsers.

  • mydomain.com/f123
  • mydomain.com/f123/
  • www.mydomain.com/f123
  • www.mydomain.com/f123/

All of them are redirected to www.mydomain.com/somfile.php?f=123 with RedirectRule in Apache main conf file, everything works perfectly with my browser, no error output in Apache log file either. However Apache logs the following errors every minute:

File does not exist: /home/mydomain/www/f123

What does this error mean and why is it thrown?

share|improve this question
    
What do you get if you request http://1.2.3.4/f123 where 1.2.3.4 is your IP address? –  Ladadadada Feb 1 '12 at 21:19
    
It's also redirected to www.mydomain.com/somfile.php?f=123 without any error output. It's always working well no matter what I try with browser. I also see the following errors: File does not exist: /home/natmed/mydomain/f123, referer: mydomain.com/f123 –  lastsmoke Feb 2 '12 at 2:39

1 Answer 1

I know this sounds dumb but does the file really exist at that location (/home/mydomain/www/f123)? If you are using a masking technique like this and the file exists elsewhere then Apache won't actually find the file if it doesn't exist in the first place.

Additionally, I was thinking it may be permissions related. Perhaps it could have something to do with the executable permission, which is used to read directories and sometimes files in certain cases. Take a look at the permissions, make sure you can access as apache (user / group).

Usually path or permission 9 out of 10 times.

share|improve this answer
    
/home/mydomain/www/f123 doesn't exist, but /home/mydomain/www/somfile.php exists, the redirection works well. Basically, the website works perfectly for me and other several thousands visitors a day, but the Apache log suggests it doesn't work for some users. But I couldn't figure out how possibly the error was thrown out, because it's always working well when I test from my browser. –  lastsmoke Feb 2 '12 at 2:50
    
Right, thats why apache is complaining. Apache thinks that the literal file /home/mydomain/www/f123 exists, when it doesn't. It might be because of how your front-end users access the file as well. Take a look in apache's access logs for some clue. –  Max Felker Feb 2 '12 at 15:55

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.