Disable Error Log Apache2
Contents |
rate: 0% 3 Answers: oldestnewestmost voted 3 Depending how apache was ./configured, you may need to set the log to /dev/null to completely disable error log apache2 ubuntu error logging. ErrorLog /dev/null --jeremy link answered 05 May '10, 16:16 apache2 error log format jeremy ♦♦ 1.0k●1●5●16 accept rate: 37% 3 You need to edit your apache configuration file. It should
Apache2 Error Log Path
be in one of the following locations. /etc/apache2/apache2.conf or /etc/httpd/httpd.conf Edit this file and look for a line similar to the below; ErrorLog /var/log/apache2/error.log Comment out this line by
Apache Disable Log
placing a '#' at the beginning like so. #ErrorLog /var/log/apache2/error.log Restart your apache daemon /etc/init.d/apache2 restart Note paths may differ depending on your distribution but should give you something to work off! link answered 05 May '10, 16:01 gjcwilliams 357●2●9 accept rate: 37% 1 But why would you want to? It contains valuable information to help you disable apache access log windows manage your webserver. link answered 05 May '10, 18:20 codebunny 408●1●6 accept rate: 38% Agreed! I guess he has lots of errors that he wants to tuck away under the carpet :) (06 May '10, 06:23) gjcwilliams Your answer toggle preview community wiki Follow this questionBy Email:Once you sign in you will be able to subscribe for any updates hereBy RSS: Answers Answers and Comments Markdown Basics *italic* or _italic_ **bold** or __bold__ link:[text](http://url.com/ "Title") image?![alt text](/path/img.jpg "Title") numbered list: 1. Foo 2. Bar to add a line break simply add two spaces to where you would like the new line to be. basic HTML tags are also supported learn more about Markdown Prefer a Linux Forum? Android Forum Chrome OS Forum Tags: apache2 ×2 errorlog ×1 Asked: 05 May '10, 14:58 Seen: 11,267 times Last updated: 05 May '10, 18:20 Related questions Cannot set permissions on /srv folder in Debian about | faq | privacy | contact powered by OSQA First time here? Check out the FAQ! ×
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies
Apache Virtual Host No Logging
of this site About Us Learn more about Stack Overflow the company apache disable logging virtual host Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask apache log levels Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can http://linuxexchange.org/questions/303/how-do-i-disable-apache2-errorlog ask a question Anybody can answer The best answers are voted up and rise to the top Disable Apache logging completely up vote 1 down vote favorite I have an old server running online with over 250 sites on it I am not sure, but maybe too many logfiles in the apachelog are slowing down the server? Now since I don't need the http://superuser.com/questions/916726/disable-apache-logging-completely Apache logs, How do I disable all logging completely? apache-http-server logging share|improve this question edited May 19 '15 at 15:47 asked May 19 '15 at 14:58 rubo77 88131742 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted I disabled all vhosts logging with: find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Cc]ustom[Ll]og/#CustomLog/g' {} \; find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Ee]rror[Ll]og/#ErrorLog/g' {} \; and commented out in /etc/apache2/apache2.conf #ErrorLog ${APACHE_LOG_DIR}/error.log and added ErrorLog /dev/null Restart apache gracefully: apache2ctl graceful I have a lot of logs in different places so I can watch the result with tail -n 1 -f /var/kunden/logs/*log /var/kunden/logs/*log /var/log/apache2/*log If you want to enable all logging into one file you can edit /etc/apache2/apache2.conf again and add those lines: ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log "%h %v %l %u %t \"%r\" %>s %b" and comment out #ErrorLog /dev/null share|improve this answer edited May 19 '15 at 16:02 answered May 19 '15 at 14:58 rubo77 88131742 add a comment| You must log in to answer this question. Not the answer you're looking for? Browse other questions tagged apache-http-server logging . asked 1 year ago viewed 1
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 http://www.pc-freak.net/blog/disable-apache-accesslog-errorlog-logging-debian-linux-freebsd/ to Apache webserver could pose significantly increase disk writes and be negative for https://www.howtoforge.com/community/threads/how-to-disable-apache-logging.52180/ 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 error log to reduce a bit the load (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: error log apache2
CustomLog ${APACHE_LOG_DIR}/access.log combined
to
#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 Error
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 be done? karon, Apr 6, 2011 #1 till Super Moderator Staff Member ISPConfig Developer Edit 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 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 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