Weird "File not found" notices in logs

LiteSpeeder

Well-Known Member
#1
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/"]

INFO	[95.9.55.240:2989-0#APVH_xxxxxx.xxx] File not found [/home/xxxxxx/public_html/"http:/xx.xxxxxx.xxx/mobile.png/"]

INFO	[95.9.55.240:2987-0#APVH_xxxxxx.xxx] File not found [/home/xxxxxx/public_html/"http:/xx.xxxxxx.xxx/theme/buttons/collapse_thead.gif/"]

INFO	[95.9.55.240:2985-0#APVH_xxxxxx.xxx] File not found [/home/xxxxxx/public_html/"http:/xx.xxxxxx.xxx/theme/buttons/sendtofriend.gif/"]
 

webizen

Well-Known Member
#2
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.
 

webizen

Well-Known Member
#4
add "RewriteLogLevel 9" in httpd.conf and restart lsws. It will be logged in /usr/local/apache/logs/error_log with '[REWRITE]' like following.

2012-04-09 23:17:34.451 [INFO] [10.8.0.6:55091-0#APVH_test.com] [REWRITE] strip base: '/' from URI: '/'
 

LiteSpeeder

Well-Known Member
#5
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>
Options All -Indexes
Header unset ETag
FileETag None
RewriteEngine on
RewriteLogLevel 9
RewriteCond %{HTTP_HOST} !^www\.xxxxxx\.xxx
RewriteRule (.*) http://www.xxxxxx.xxx/$1 [L,R=301]
</Directory>
 

NiteWave

Administrator
#6
per
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriteloglevel
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>
 

LiteSpeeder

Well-Known Member
#7
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:'
 
Top