Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th September 2007, 21:55
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default Stop error loggin missing images?

Anyone here who might know how I can stop my apache2 error log filling up with errors of missing images?

One of the client sites on my (ISPconfig) server is an image hosting service.
As the images are deleted after some time (1 year), and as a lot of people are still linking to some of the deleted images the Apache error log file gets really big!

I've found this fix, (needs to be added to the Apache httpd.conf) but thats for the normal Apache log file, and not for the Apache error log file:
Quote:
LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" combined
SetEnvIf Request_URI \.gif$ is-image
SetEnvIf Request_URI \.GIF$ is-image
SetEnvIf Request_URI \.jpg$ is-image
SetEnvIf Request_URI \.JPG$ is-image
SetEnvIf Request_URI \.jpeg$ is-image
SetEnvIf Request_URI \.JPEG$ is-image
CustomLog /dev/null combined env=is-image
CustomLog /usr/local/apache/sites/domain.com/logs/access.log combined env=!is-image

ErrorLog /usr/local/apache/sites/domain.com/logs/error.log
I would also like to have this for only the "problem" site, and not for all the sites that are hosted on my server.
Again, I'm using ISPconfig to manage the server, so I do not want to "break" any other function!
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
Sponsored Links
  #2  
Old 21st September 2007, 18:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Have you tried env=!is-image in the ErrorLog line?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st September 2007, 22:01
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,033
Thanks: 261
Thanked 147 Times in 128 Posts
Default

Quote:
Originally Posted by falko
Have you tried env=!is-image in the ErrorLog line?
falko.

I've not tried this.
Should I put this in the httpd.conf?
Google does not give much usable info about this.
__________________
Never execute code written on a Friday or a Monday.
Reply With Quote
  #4  
Old 22nd September 2007, 12:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
 
Default

Quote:
Originally Posted by edge
Should I put this in the httpd.conf?
Yes, try it (I'm interested in the result as well ). If it doesn't work, you can undo it.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Availability Samba cluster - DRBD + Heartbeat djalex Server Operation 58 25th May 2007 19:38
Joomla images doesn't show off ! gabrix Server Operation 7 2nd November 2006 18:01
required modules missing etag1949 Installation/Configuration 2 2nd June 2006 14:13
Help....package missing sbovisjb1 Installation/Configuration 3 31st March 2006 11:14
Missing images in the ISPConfig nandhu General 6 22nd August 2005 16:39


All times are GMT +2. The time now is 05:59.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.