LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-29-2009, 08:12 PM   #1
Aeolustw
Member
 
Registered: Jun 2009
Location: Taiwan
Distribution: Linux Debian (or CentOS)
Posts: 57

Rep: Reputation: 2
How to avoid recording some error log ?


How to avoid recording some error log ?

The server os is Debian 5.0.x.

As we know , if we want to avoid to record some access log , we can edit the file below:
/etc/apache2/site-available/default
Code:
......................
......................
SetEnvIf Remote_Addr "66\.249\.67\.49" dontlog
......................
......................
CustomLog /var/log/apache2/access.log combined env=!dontlog
......................
And the error log line is:
Code:
ErrorLog /var/log/apache2/error.log
How to avoid recording the error log occured by the trusted IP like google?

p.s.
Quote:
Like these error log that i don't want to record:
[Mon Nov 30 09:41:28 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb300a
[Mon Nov 30 09:43:26 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb3rc1
[Mon Nov 30 09:45:24 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb3rc1
[Mon Nov 30 09:47:22 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb3rc1
[Mon Nov 30 09:48:01 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb300a
[Mon Nov 30 09:49:20 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb3rc1
[Mon Nov 30 09:50:38 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb3rc1
[Mon Nov 30 09:51:18 2009] [error] [client 66.249.67.49] File does not exist: /var/www/ipb3rc1

Thanks.

Last edited by Aeolustw; 11-29-2009 at 08:13 PM.
 
Old 11-30-2009, 01:17 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
Code:
dig -x 66.249.67.49
-- snip --
;; ANSWER SECTION:
49.67.249.66.in-addr.arpa. 86400 IN	PTR	crawl-66-249-67-49.googlebot.com.
Well personally, I would take a different approach to this issue. You don't want to suppress things that are in fact errors. Why is Google looking for that nonsense? You could try adding ipb* as entry to a robots.txt file. I use the Google Webmaster Tools interface for my site so that I can set Googlebot straight when it isn't looking for the right stuff. You could use it to explicitly tell Google not to look for that stuff. If you have links to those pages on your site, try removing them. Cheers, J
 
1 members found this post helpful.
Old 11-30-2009, 08:36 PM   #3
Aeolustw
Member
 
Registered: Jun 2009
Location: Taiwan
Distribution: Linux Debian (or CentOS)
Posts: 57

Original Poster
Rep: Reputation: 2
Thanks.

I will try your good suggestion.
 
Old 12-01-2009, 06:51 PM   #4
Aeolustw
Member
 
Registered: Jun 2009
Location: Taiwan
Distribution: Linux Debian (or CentOS)
Posts: 57

Original Poster
Rep: Reputation: 2
After adding a line below , it works fine now.
Code:
Disallow: /ipb*
Thanks

Last edited by Aeolustw; 12-01-2009 at 06:55 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KPPP - How to avoid Proxy ARP error in Slackware 13 Erik_FL Slackware 0 09-06-2009 01:28 AM
how to use sysctl to avoid I/o error naveenisback Programming 1 08-12-2009 11:11 PM
How to avoid this CD Write error? vibinlakshman Linux - Software 1 03-07-2009 01:17 PM
Apache 2.0 | logging | Recording the host name in the log files ganz_friedrich Linux - Software 2 02-16-2006 03:06 PM
mysql dupe entry error, how to avoid? hydro Linux - Software 0 09-20-2003 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration