Disable Error Log Httpd.conf
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up disabling apache logging to access.log [closed] up vote 7 down vote favorite I've been reading about disabling the logging of the apache server, which is crucial for me as I'm running huge tests on it, and it fills the disk. I've tried changing http.conf and directing stuff to /dev/null, but none of it worked, as most of it was the Error logging. Any idea anyone? Thanks linux apache logging share|improve this question asked Nov 25 '12 at 15:14 Alon_T 41831029 closed as off-topic by Matteo Tassinari, HansUp, user000001, Mike, Ruchira Gayan Ranaweera Sep 2 '13 at 17:05 This question appears to be off-topic. The users who voted to close gave this specific reason:"Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – Matteo Tassinari, HansUp, user000001, Mike, Ruchira Gayan RanaweeraIf this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted In order to disable and turn off the Apache logging, just comment out the log lines in the Apache configuration file. Read more here. share|improve this answer answered Nov 25 '12 at 15:24 undone 6,20232756 Yeah I dag a little in the file
times disabling logging on a busy websites is quite beneficial, especially if more than few Gigabytes are written in Apache visitors log (access.log) every day. Too much visitors to Apache webserver could pose significantly increase disk writes and be negative for overall server performance. Disabling the log is handy also for websites which already integrate a different type of visitors logging lets say - via MySQL, PostgreSQL (SQL) … From security perspective disabling logging is a very stupid idea thought, however on systems which are experiencing high load and you need to sacrifice logging to reduce a bit the load http://stackoverflow.com/questions/13552312/disabling-apache-logging-to-access-log (especially if you cannot afford to get a new server hardware), disabling it is an option. 1. Disabling access.log and error on Debian Linux a) Disabling access.log logging As most Debian users already know on Debian GNU Linux Apache logs all incoming (port 80) Apache requests to /var/log/apache2/access.log and /var/log/apache2/error.log Disabling logging is very simple, just comment out line in /etc/apache2/sites-enabled/000-default:
CustomLog ${APACHE_LOG_DIR}/access.log combined
to
http://www.pc-freak.net/blog/disable-apache-accesslog-errorlog-logging-debian-linux-freebsd/ #CustomLog ${APACHE_LOG_DIR}/access.log combined
Then restart the webserver to re-read new config value:
# /etc/init.d/apache2 restart
....
Of course this is one of the ways to disable access.log logging. Other ways are to make logging gets logged in good old /dev/null. To use /dev/null forwardingp put Customlog /dev/null in /etc/apache2/sites-enabled/000-default
CustomLog /dev/null
In Debian Lenny and older Debian releases Customlog Apache directive is found in /etc/apache2/apache2.conf. b) Disabling error.log logging Same procedure applies for disabling error.log, comment out default ErrorLog directive, restart Apache and you're done:
ErrorLog ${APACHE_LOG_DIR}/error.log
should become:
ErrorLog /dev/null
Usually just comming ErrorLog ${APACHE_LOG_DIR}/error.log is supposed to work, unfortunately for reason on Debian Squeeze this worked not commenting it and restarting Apache failed to restart apache with error:
# /etc/init.d/apache2 restart
Restarting web server: apache2 ... waiting (2)No such file or directory: apache2: could not open error log file /etc/apache2/logs/error_log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
failed!
Thus to disalbe error.log you need to add ErrorLog /dev/null in /etc/apache2/apache2.conf and once again restart Apache.
ErrorLog /dev/null
# /etc/init.d/apache2 restart<
have several high traffic sites that put a considerable IO load on the sytem because of their access and error logging. I can't find any option in ISPConfig 3 to disable logging on a site or the entire server. How can this https://www.howtoforge.com/community/threads/how-to-disable-apache-logging.52180/ be done? karon, Apr 6, 2011 #1 till Super Moderator Staff Member ISPConfig Developer Edit http://bookofzeus.com/articles/apache/how-to-easily-disable-log-in-apache the ispconfig.conf file in /etc/apache2/sites-available and comment out the customlog line, then restart apache. till, Apr 7, 2011 #2 karon New Member The line in question looks like this: CustomLog "| /usr/local/ispconfig/server/scripts/vlogger -s access.log -t \"%Y%m%d-access.log\" -d \"/etc/vlogger-dbi.conf\" /var/log/ispconfig/httpd" combined_ispconfigClick to expand... So if I comment this out, error logging (that's defined in the sites individual vhost files) will still be disable error on, right? karon, Apr 7, 2011 #3 till Super Moderator Staff Member ISPConfig Developer yes. the line above is the access.log and not the error.log. till, Apr 7, 2011 #4 abubin New Member how do is disable the access.log only? I don't see the customlog in the vhost file for the specified domain. Using ispconfig 3.0.2.2 abubin, Aug 5, 2011 #5 till Super Moderator Staff Member ISPConfig Developer Just remove the line that is mentioned disable error log in post #3 from the apache config. It is in the ispconfig.conf file and not in a vhost as it is a global logging directive and not site specific. till, Aug 5, 2011 #6 cypriot New Member Found an easy way of doing this go into website settings and options in admin of Ispconfig, and add this two line into Apache Directives CustomLog /dev/null Combined AccessLog /dev/null Combined you will see all logs will stop i guess you guys can add tick box on the setting page of the site to add this two line auto ? Regards cypriot, Feb 2, 2013 #7 (You must log in or sign up to reply here.) Show Ignored Content Share This Page Tweet Log in with Facebook Log in with Twitter Log in with Google Your name or email address: Do you already have an account? No, create an account now. Yes, my password is: Forgot your password? Stay logged in Sign up now! Forum Statistics Discussions: 53,482 Messages: 283,658 Members: 91,667 Latest Member: gina1876 Share This Page Tweet Howtoforge - Linux Howtos and Tutorials Home Forums > ISPConfig 3 > Installation/Configuration > English | Deutsch Tutorials Tags Forums Forums Quick Links Search Forums Recent Posts Members Members Quick Links Notable Members Current Visitors Recent Activity New Profile Posts Contribute Subscribe ISPConfig News Menu Search Search titles only Posted by Member: Separate names w
Editor Environment Flash Player Fonts Icons Indicator Install Keyboard Shortcuts Live CD Packages Privacy Settings Themes Window Harden Ubuntu Initial Setup Server Setup Disabled Services Hardening Monitoring Tools Optimization Software Useful Commands Backup BookOfZeus > articles > apache How to easily disable log in apache Posted on Thursday February 17, 2011 / by Eric Potvin Logs are important, specially for production server. For development or QA servers, they might not be as important since you can turn on errors directly on the screen. Here's how to easily disable log (access and error log) in apache to avoid excessive writes on local server. Open your /etc/apache2/apache2.conf file and change the following two configurations: Change the ErrorLog to: ErrorLog /dev/null Now, open /etc/apache2/conf.d/other-vhosts-access-log and comment the following line #CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined In addition, you might have to change these files: /etc/apache2/sites-available/default-ssl /etc/apache2/sites-available/default and change the ErrorLog and comment out the CustomLog: ErrorLog /dev/null #CustomLog ${APACHE_LOG_DIR}/access.log combined More links About Articles CodeBase Contribute NewsLetters Sign up for our free newsletter! Unsubscribe from our newsletter Powered by MailChimp © 2011-2016 BookOfZeus All articles, code or tutorials listed on bookofzeus.com can be used as reference, links or as in a sharing matter without attribution. You cannot copy whole tutorials (unless permission is given), either translating to another language. By using and/or reading this site, you agree to our privacy policy and terms and conditions.