LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-14-2013, 09:42 PM   #1
nuttynibbles
Member
 
Registered: Apr 2010
Posts: 59

Rep: Reputation: 0
how to disable apache error_log


hi,

will someone help me to turn off apache error_log? i have been trying to disable apache error_log in /var/log/apache2/error_log but unsuccessful. im doing it temporary to debug a system problem. i have tried out different methods like commenting error_log and setting "error_log /dev/null" in /etc/apache2/httpd.conf and /etc/apache2/vhosts.d/vhost.conf but still not successful.

i have nagios installed and its nagios.conf is in /etc/apache2/conf.d/nagios.conf. i tried setting error_log /dev/null within <direcotry> but got an error.
 
Old 03-14-2013, 10:09 PM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,230

Rep: Reputation: 132Reputation: 132
Quote:
ErrorLog /dev/null
How you used the line error_log or ErrorLog?
 
Old 03-14-2013, 10:15 PM   #3
nuttynibbles
Member
 
Registered: Apr 2010
Posts: 59

Original Poster
Rep: Reputation: 0
hey sorry typo, i used ErrorLog /dev/null. its not working tho
 
Old 03-15-2013, 12:02 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 564

Rep: Reputation: 113Reputation: 113
If you open php.ini, you will find
Code:
log_errors = On
change it to
Code:
log_errors = Off
and restart apache.
as well as you can comment following line in your apache2.conf
Code:
ErrorLog ${APACHE_LOG_DIR}/error.log
Restart apache.

Last edited by eklavya; 03-15-2013 at 12:07 AM.
 
Old 03-15-2013, 12:28 AM   #5
nuttynibbles
Member
 
Registered: Apr 2010
Posts: 59

Original Poster
Rep: Reputation: 0
hi, im not using php. in fact im working with cgi. i discover that cgi output is written to the error_log file. i read that scriptlog is responsible for it but where can i disable it??
 
Old 03-15-2013, 01:15 AM   #6
eklavya
Member
 
Registered: Mar 2013
Posts: 564

Rep: Reputation: 113Reputation: 113
ScriptLog Directive
Description: Location of the CGI script error logfile
Syntax: ScriptLog file-path
Context: server config, virtual host
Status: Base
Module: mod_cgi, mod_cgid

The ScriptLog directive sets the CGI script error logfile. If no ScriptLog is given, no error log is created. If given, any CGI errors are logged into the filename given as argument. If this is a relative file or path it is taken relative to the ServerRoot.
Example
Code:
ScriptLog logs/cgi_log
This log will be opened as the user the child processes run as, i.e. the user specified in the main User directive. This means that either the directory the script log is in needs to be writable by that user or the file needs to be manually created and set to be writable by that user. If you place the script log in your main logs directory, do NOT change the directory permissions to make it writable by the user the child processes run as.

Note that script logging is meant to be a debugging feature when writing CGI scripts, and is not meant to be activated continuously on running servers. It is not optimized for speed or efficiency, and may have security problems if used in a manner other than that for which it was designed.
 
  


Reply

Tags
apache2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Limit apache error_log amolmistry Linux - Software 4 10-18-2012 07:17 AM
Apache /public_html ? error_log maas187 Linux - Server 12 02-14-2009 01:20 AM
apache error_log always full Suinatsa Linux - Software 1 07-21-2006 03:44 AM
Apache error_log Sapient Linux - Software 1 12-31-2005 08:10 PM
a better php/apache error_log joe.biz Linux - Software 1 10-27-2005 06:17 PM


All times are GMT -5. The time now is 04:53 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration