For my log rotation, I use this shell script every month: #!/bin/csh # Written by John Airey 30/6/2000 # Move Apache log files and reload Apache web server /bin/mv /var/log/httpd/* /var/log/httpd/archive /etc/rc.d/init.d/httpd reload
The log files that are created are then burnt onto CD and deleted from the server (if I remember to do it!) As you can see, not the flashiest of scripts! - John Airey Internet systems support officer, ITCSD, Royal National Institute for the Blind, Bakewell Road, Peterborough PE2 6XU, Tel.: +44 (0) 1733 375299 Fax: +44 (0) 1733 370848 [EMAIL PROTECTED] >-----Original Message----- >From: R. DuFresne [mailto:[EMAIL PROTECTED]] >Sent: 12 October 2001 16:37 >To: Rachel >Cc: [EMAIL PROTECTED] >Subject: Re: Apache connection died > > > >On my systems it does not, that is why I sugested altering your perl >script in use already. Yet, Owen or John, I certainl, bo to >their better >modssl knowledge, might beable to enlighten both of us if the >rotate logs >function of apache can do this in one fell swoop, which would >allow me to >reduce a step or two in my setups. Otherwise, it works well. > >Thanks, > >Ron DuFresne > >On Fri, 12 Oct 2001, Rachel wrote: > >> will the access_log name be arrange follow by the date? >> like: >> access_log20011011 >> >> Rachel >> >> ----- Original Message ----- >> From: "R. DuFresne" <[EMAIL PROTECTED]> >> To: <[EMAIL PROTECTED]> >> Sent: Thursday, October 11, 2001 8:58 PM >> Subject: Re: Apache connection died >> >> >> > >> > If you used the builtin capability to rotate logs within >apache, you could >> > eliminate this whole step and the troubles inherent in >this process. >> > You'll most likely have to change yer perl script to do this: >> > >> > httpd.conf; >> > >> > TransferLog "|/usr/local/apache/bin/rotatelogs >> > /usr/local/apache/logs/access_log 86400" >> > >> > >> > Thanks, >> > >> > Ron DuFresne >> > >> > >> > >> > On Thu, 11 Oct 2001, Rachel wrote: >> > >> > > the reason for the cronjob:- >> > > to change the access.log name into more manageble name, like:- >> > > access.log20011010.gz (to it equal to "access.log for >the day of 10 Oct >> > > 2001) >> > > so need to stop the apache and rename the access.log to >new name and >> gzip >> > > it. >> > > here's the log example:- >> > > >> > > #!/usr/bin/perl >> > > # This script is mainly for producing rotate access log >daily and rename >> > > # it into format access.log(yyyymmdd).gz >> > > >> > > $file1=shift; >> > > print "Attempting to rotate $file1\n"; >> > > >> > > ($sec,$minute,$hour,$mday,$mth,$year,)=localtime(time); >> > > $year+=1900; >> > > $mth++; >> > > $mth='0'.$mth if $mth<=9; >> > > $mday='0'.$mday if $mday<=9; >> > > $new_file="$file1$year$mth$mday"; >> > > rename ($file1,$new_file) or die "can't rename:$!\n"; >> > > die "can't restart httpd:$!\n" if >> system('/usr/local/apache/bin/apachectl >> > > restart'); >> > > print "Sleeping after move\n"; >> > > sleep 10; >> > > print "Zipping the file up\n"; >> > > die "can't gzip:$!\n" if system("gzip $new_file"); >> > > print "Done\n"; >> > > >> > > >> > > ----- Original Message ----- >> > > From: "R. DuFresne" <[EMAIL PROTECTED]> >> > > To: <[EMAIL PROTECTED]> >> > > Sent: Thursday, October 11, 2001 7:31 PM >> > > Subject: Re: Apache connection died >> > > >> > > >> > > > >> > > > What is the reason for this cron job? Can you show >the line from the >> > > > crontab that impliments it? >> > > > >> > > > Thanks, >> > > > >> > > > Ron DuFresne >> > > > >> > > > On Thu, 11 Oct 2001, Rachel wrote: >> > > > >> > > > > Yup... i found a cronjob that running every nite... >> > > > > is that possible to restart the apache with startssl >option in >> cronjob? >> > > > > bcos the apache will require a password to start the SSL >> connection.... >> > > > > how should i automate it? >> > > > > >> > > > > >> > > > > ----- Original Message ----- >> > > > > From: "Ashton, Bruce" <[EMAIL PROTECTED]> >> > > > > To: <[EMAIL PROTECTED]> >> > > > > Sent: Thursday, October 11, 2001 4:10 PM >> > > > > Subject: RE: Apache connection died >> > > > > >> > > > > >> > > > > > SIGHUP is a kind of signal that can be sent to a >Unix process to >> cause >> > > it >> > > > > to >> > > > > > terminate. open a shell on your Unix box and type >'man kill', >> also >> > > 'man >> > > > > > nohup', nohup may be the answer to your problems. >> > > > > > >> > > > > > >> > > > > > >> > > > > > Bruce Ashton >> > > > > > Java Developer >> > > > > > Product Development Branch >> > > > > > Commercial Division >> > > > > > ext. 4560 >> > > > > > >> > > > > > > -----Original Message----- >> > > > > > > From: Rachel [SMTP:[EMAIL PROTECTED]] >> > > > > > > Sent: Thursday, October 11, 2001 3:25 AM >> > > > > > > To: [EMAIL PROTECTED] >> > > > > > > Subject: Apache connection died >> > > > > > > >> > > > > > > Hi, I having problem where my APACHE no longer >run after the >> > > everynight >> > > > > > > 12:01am.... >> > > > > > > I have no idea what's the error message >below.... can someone >> > > > > > > teach/explain to me? >> > > > > > > >> > > > > > > What is SIGHUP received ? where can i configure it? >> > > > > > > What is the bottom error message that say >"dynamic module limit >> was >> > > > > > > reached"? how can i increase it? >> > > > > > > >> > > > > > > [Thu Oct 11 00:00:01 2001] [notice] SIGHUP >received. Attempting >> to >> > > > > > > restart >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_ssl.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > mod_setenvif.c: >> > > > > > > not found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_auth.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > mod_access.c: >> > > > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_alias.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > mod_userdir.c: >> > > > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > mod_actions.c: >> > > > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_imap.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_asis.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_cgi.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_dir.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > mod_autoindex.c: >> > > > > > > not found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > mod_include.c: >> > > > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > mod_status.c: >> > > > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > > > mod_negotiation.c: >> > > > > > > not found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_mime.c: >> > > not >> > > > > > > found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> > > > > mod_log_config.c: >> > > > > > > not found in module list >> > > > > > > [Thu Oct 11 00:00:01 2001] [error] Cannot remove module >> mod_env.c: >> > > not >> > > > > > > found in module list >> > > > > > > httpd: module "mod_proxy.c" could not be loaded, >because the >> dynamic >> > > > > > > module limit was reached. Please increase >DYNAMIC_MODULE_LIMIT >> and >> > > > > > > recompile. >> > > > > > > >> > > > > > > >> > > > > > >> >______________________________________________________________________ >> > > > > > Apache Interface to OpenSSL (mod_ssl) >> www.modssl.org >> > > > > > User Support Mailing List >> [EMAIL PROTECTED] >> > > > > > Automated List Manager >> [EMAIL PROTECTED] >> > > > > > >> > > > > >> > > > > >> >______________________________________________________________________ >> > > > > Apache Interface to OpenSSL (mod_ssl) >> www.modssl.org >> > > > > User Support Mailing List >> [EMAIL PROTECTED] >> > > > > Automated List Manager >> [EMAIL PROTECTED] >> > > > > >> > > > >> > > > -- >> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> > > > admin & senior consultant: darkstar.sysinfo.com >> > > > http://darkstar.sysinfo.com >> > > > >> > > > "Cutting the space budget really restores my faith in >humanity. It >> > > > eliminates dreams, goals, and ideals and lets us get >straight to the >> > > > business of hate, debauchery, and self-annihilation." >> > > > -- Johnny Hart >> > > > >> > > > testing, only testing, and damn good at it too! >> > > > >> > > > >______________________________________________________________________ >> > > > Apache Interface to OpenSSL (mod_ssl) > www.modssl.org >> > > > User Support Mailing List >[EMAIL PROTECTED] >> > > > Automated List Manager >[EMAIL PROTECTED] >> > > > >> > > >> > > >______________________________________________________________________ >> > > Apache Interface to OpenSSL (mod_ssl) www.modssl.org > > > User Support Mailing List [EMAIL PROTECTED] > > > Automated List Manager [EMAIL PROTECTED] > > > > > > > -- > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > admin & senior consultant: darkstar.sysinfo.com > > http://darkstar.sysinfo.com > > > > "Cutting the space budget really restores my faith in humanity. It > > eliminates dreams, goals, and ideals and lets us get straight to the > > business of hate, debauchery, and self-annihilation." > > -- Johnny Hart > > > > testing, only testing, and damn good at it too! > > > > ______________________________________________________________________ > > Apache Interface to OpenSSL (mod_ssl) www.modssl.org > > User Support Mailing List [EMAIL PROTECTED] > > Automated List Manager [EMAIL PROTECTED] > > > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ admin & senior consultant: darkstar.sysinfo.com http://darkstar.sysinfo.com "Cutting the space budget really restores my faith in humanity. It eliminates dreams, goals, and ideals and lets us get straight to the business of hate, debauchery, and self-annihilation." -- Johnny Hart testing, only testing, and damn good at it too! ______________________________________________________________________ Apache Interface to OpenSSL (mod_ssl) www.modssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] - NOTICE: The information contained in this email and any attachments is confidential and may be legally privileged. If you are not the intended recipient you are hereby notified that you must not use, disclose, distribute, copy, print or rely on this email's content. If you are not the intended recipient, please notify the sender immediately and then delete the email and any attachments from your system. RNIB has made strenuous efforts to ensure that emails and any attachments generated by its staff are free from viruses. However, it cannot accept any responsibility for any viruses which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk ______________________________________________________________________ Apache Interface to OpenSSL (mod_ssl) www.modssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
