homepage Welcome to WebmasterWorld Guest from 50.19.33.5
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
My log fills up with jpg requests
setenvif?
smiddy




msg:1521145
 4:52 pm on Mar 30, 2005 (gmt 0)

My website hosts a lot of images. Does it make sense to issue this statement in my httpd.conf file?

SetEnvIf Request_URI "\.jpg$" dontlog

I can't see any reason why I need to log these for security purposes. Can you?

 

jdMorgan




msg:1521146
 8:55 pm on Mar 30, 2005 (gmt 0)

That depends on whether you occasionally scan your logs (or stats) for evidence of hotlinking -- people putting image links on their Websites that cause their visitors browsers to fetch the images from your server. If this is not a concern, then you might want to disable logging for image requests.

Jim

smiddy




msg:1521147
 9:15 pm on Mar 30, 2005 (gmt 0)

Ahhh....good point. I'll keep that one in mind.

killroy




msg:1521148
 10:19 pm on Mar 30, 2005 (gmt 0)

Personally I use:

<FilesMatch "(\.(gif¦jpg¦png¦ico¦css¦js)¦robots\.txt)$">
SetEnv image-request 1
SetEnv dont-log 1
</FilesMatch>
CustomLog logs/access.log complete env=!dont-log

Does setting "dontlog" instead of my own "dont-log" mean u can skip the "env=" parameter for CustomLog?

SN

sitz




msg:1521149
 10:20 pm on Mar 30, 2005 (gmt 0)

Also matters for things link hitcount (or bytecount) tracking. If you don't log those requests, you can't track them at all; you can't see which images are getting hit hard, and figuring out how much traffic you're pushing in a day becomes tricky (to say the least). If these aren't issues, then by all means, look into not logging. Me, I log every request, even on the sites where I need to roll/compress my logs multiple times per day to keep things running smoothly. =)

jollymcfats




msg:1521150
 5:28 pm on Mar 31, 2005 (gmt 0)

I don't log image requests unless they have an off-site referrer.
<Files ~ "\.(gif¦jpe?g¦png¦ico)$"> 
SetEnvIf intra_site_referral 1 common_image_request
</Files>
CustomLog access_log combined env=!common_image_request

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved