![]() |
Weird "File not found" notices in logs
Hello,
I've been noticing these errors in the server log viewer for a very long time. I checked/searched all of my templates, html, php, js files and even my database via sql queries but i couldn't find any clues regarding the source of the notices below. For example there are no links referring to "http:/xx.xxxxxx.xxx/mobile.png/" which is a theme element/image. I can see the image with the correct link on my site through every browsers. These notices are always in logs with different IPs and i think it may be related to lsws. Does it cause any performance issues if 10% of visitors (maybe robots) request these "not found" files? How can i fix it? Code:
INFO [95.9.55.240:2983-0#APVH_xxxxxx.xxx] File not found [/home/xxxxxx/public_html/"http:/xx.xxxxxx.xxx/theme/buttons/printer.gif/"] |
LSWS would not manipulate URL. maybe you have rewrite rules generating something like http://domain/"http:/xx.xxxxxx.xxx/theme/buttons/sendtofriend.gif/". enable rewrite log to see this is the case. Or your application does that.
|
How can i enable rewrite log?
|
add "RewriteLogLevel 9" in httpd.conf and restart lsws. It will be logged in /usr/local/apache/logs/error_log with '[REWRITE]' like following.
Quote:
|
I put it right after 'RewriteEngine on' in httpd.conf but it says "/usr/local/apache/conf/httpd.conf:567: Directive 'RewriteLog' is not allowed in current context." when i restart lsws.
Code:
<Directory /home/xxxxxx/public_html> |
per
http://httpd.apache.org/docs/2.0/mod...ewriteloglevel Context: server config, virtual host however, your RewriteLogLevel 9 is in a "directory" context. try move it out of <Directory /home/xxxxxx/public_html> ... </Directory> i.e., RewriteLogLevel 9 <Directory /home/xxxxxx/public_html> Options All -Indexes Header unset ETag FileETag None RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.xxxxxx\.xxx RewriteRule (.*) http://www.xxxxxx.xxx/$1 [L,R=301] </Directory> |
Thank you. I enabled it. But it doesn't display any results:
tail -f /usr/local/apache/logs/error_log|fgrep '[rewrite:' tail -f /usr/local/apache/logs/error_log|fgrep '[REWRITE:' |
| All times are GMT -7. The time now is 05:13 PM. |