Weird "File not found" notices in logs

Discussion in 'vBulletin Forum' started by LiteSpeeder, Apr 12, 2012.

  1. LiteSpeeder

    LiteSpeeder New Member

    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/"]
  2. webizen

    webizen New Member

    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.
  3. LiteSpeeder

    LiteSpeeder New Member

    How can i enable rewrite log?
  4. webizen

    webizen New Member

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

  5. LiteSpeeder

    LiteSpeeder New Member

    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>
  6. NiteWave

    NiteWave Administrator

    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>
  7. LiteSpeeder

    LiteSpeeder New Member

    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:'

Share This Page