LinuxQuestions.org
Visit Jeremy's Blog.
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 03-30-2009, 11:48 PM   #1
noir911
Member
 
Registered: Apr 2004
Posts: 682

Rep: Reputation: Disabled
exclude from apache 2.x logs


I'm getting some entries in access log that I would rather not get; I would prefer them to go to /dev/null instead. Is there any way to tell apache not to log certain stuff?

Thanks.
 
Old 03-31-2009, 11:04 AM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Can you give an example entry?
 
Old 03-31-2009, 05:24 PM   #3
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by anomie View Post
Can you give an example entry?
Here it is

Quote:
172.16.20.34 - - [30/Apr/2009:09:30:49] "GET /download/windows/static/auth.cab HTTP/1.1" 302 374 "-" "Microsoft-CryptoAPI/5.131.2600.5512"
 
Old 03-31-2009, 06:35 PM   #4
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
Look at the CustomLog directive in your configuration. You will find something like:
Code:
CustomLog /var/log/apache2/access.log combined
Simple remove that line.
 
Old 03-31-2009, 06:41 PM   #5
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by saman007uk View Post
Look at the CustomLog directive in your configuration. You will find something like:
Code:
CustomLog /var/log/apache2/access.log combined
Simple remove that line.
Could you please describe what removing the CustomLog line will do? Thanks.
 
Old 03-31-2009, 06:47 PM   #6
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
Exactly what you want to do. It will stop recording ACCESS and GET requests, but it will continue logging erros.
 
Old 03-31-2009, 07:51 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Yes, it looks like you probably are using combined format.

Is your intention to stop access logging altogether? Or to suppress one of the fields in that entry? Or what?
 
  


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
rotate apache logs curos Slackware 2 04-20-2006 03:29 AM
About Apache Logs SiLiCoN Linux - Networking 1 05-26-2005 10:34 AM
Apache Logs Valso Linux - Software 2 11-05-2004 03:13 PM
Moving Apache logs pembo13 Linux - Networking 2 08-26-2004 06:49 PM
Apache logs - ???Linux logs??? mylo2003 Linux - General 3 08-07-2003 04:49 PM

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

All times are GMT -5. The time now is 06:08 AM.

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