Sponsored Content
Operating Systems Linux Problems with log rotate and virtual hosts Post 302223224 by anderow on Friday 8th of August 2008 04:05:38 PM
Old 08-08-2008
Quote:
Originally Posted by Annihilannic
Looking closer at your logrotate rule, it looks like the prerotate script, genstats.sh is the one generating that output.

What is the output of logrotate -v (you can chop out the genstats bit as we've alraedy seen it)?
Thanks. Sorry for this slow reply.

Here is the output from the verbose command

Quote:
[me@server ~]# logrotate -v /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file acpid
reading config info for /var/log/acpid
reading config file cups
reading config info for /var/log/cups/*_log
reading config file httpd
reading config info for /var/log/httpd/*log
reading config file httpdvirtual
reading config info for /var/log/httpd/*/.accesslog /var/log/httpd/*/.errorlog /var/log/httpd/*/.sslerrorlog /var/log/httpd/*/.sslaccesslog
httpdvirtual: 4: the errors directive is deprecated and no longer used.
error: httpdvirtual:4 unexpected text
reading config file mgetty
reading config info for /var/log/mgetty.log.tty[^.] /var/log/mgetty.log.tty[^.][^.] /var/log/mgetty.log.tty[^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.unknown /var/log/mgetty.callback
reading config file ppp
reading config info for /var/log/ppp/connect-errors
reading config file psacct
reading config info for /var/account/pacct
reading config file rpm
reading config info for /var/log/rpmpkgs
reading config file syslog
reading config info for /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron
reading config file up2date
reading config info for /var/log/up2date
reading config file vsftpd.log
reading config info for /var/log/xferlog
reading config file yum
reading config info for /var/log/yum.log
reading config info for /var/log/wtmp
reading config info for /var/log/rkhunter.log

Handling 14 logs

rotating pattern: /var/log/acpid 65536 bytes (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/acpid
log does not need rotating

rotating pattern: /var/log/cups/*_log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cups/access_log
log does not need rotating
considering log /var/log/cups/error_log
log does not need rotating
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/httpd/*log weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/httpd/access_log
log does not need rotating
considering log /var/log/httpd/error_log
log does not need rotating
considering log /var/log/httpd/ssl_access_log
log does not need rotating
considering log /var/log/httpd/ssl_error_log
log does not need rotating
considering log /var/log/httpd/ssl_request_log
log does not need rotating
not running shared prerotate script, since no logs will be rotated
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/httpd/*/.accesslog /var/log/httpd/*/.errorlog /var/log/httpd/*/.sslerrorlog /var/log/httpd/*/.sslaccesslog weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/httpd/*/.accesslog
log /var/log/httpd/*/.accesslog does not exist -- skipping
considering log /var/log/httpd/*/.errorlog
log /var/log/httpd/*/.errorlog does not exist -- skipping
considering log /var/log/httpd/*/.sslerrorlog
log /var/log/httpd/*/.sslerrorlog does not exist -- skipping
considering log /var/log/httpd/*/.sslaccesslog
log /var/log/httpd/*/.sslaccesslog does not exist -- skipping
not running shared prerotate script, since no logs will be rotated
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/mgetty.log.tty[^.] /var/log/mgetty.log.tty[^.][^.] /var/log/mgetty.log.tty[^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.] /var/log/mgetty.log.unknown /var/log/mgetty.callback weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/mgetty.log.tty[^.]
log /var/log/mgetty.log.tty[^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.]
log /var/log/mgetty.log.tty[^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.]
log /var/log/mgetty.log.tty[^.][^.][^.][^.][^.][^.][^.][^.][^.][^.] does not exist -- skipping
considering log /var/log/mgetty.log.unknown
log /var/log/mgetty.log.unknown does not exist -- skipping
considering log /var/log/mgetty.callback
log /var/log/mgetty.callback does not exist -- skipping

rotating pattern: /var/log/ppp/connect-errors after 1 days (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/ppp/connect-errors
log /var/log/ppp/connect-errors does not exist -- skipping

rotating pattern: /var/account/pacct after 1 days (31 rotations)
empty log files are not rotated, old logs are removed
considering log /var/account/pacct
log does not need rotating

rotating pattern: /var/log/rpmpkgs weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/rpmpkgs
log does not need rotating

rotating pattern: /var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/messages
log does not need rotating
considering log /var/log/secure
log does not need rotating
considering log /var/log/maillog
log does not need rotating
considering log /var/log/spooler
log does not need rotating
considering log /var/log/boot.log
log does not need rotating
considering log /var/log/cron
log does not need rotating
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/up2date weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/up2date
log does not need rotating

rotating pattern: /var/log/xferlog weekly (4 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/xferlog
log does not need rotating

rotating pattern: /var/log/yum.log 30720 bytes (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/yum.log
log does not need rotating

rotating pattern: /var/log/wtmp weekly (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/wtmp
log does not need rotating

rotating pattern: /var/log/rkhunter.log after 1 days (21 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/rkhunter.log
log does not need rotating
I dont understand why this

Quote:
pattern: /var/log/httpd/*/.accesslog /var/log/httpd/*/.errorlog /var/log/httpd/*/.sslerrorlog /var/log/httpd/*/.sslaccesslog weekly (4 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/httpd/*/.accesslog
log /var/log/httpd/*/.accesslog does not exist -- skipping
considering log /var/log/httpd/*/.errorlog
log /var/log/httpd/*/.errorlog does not exist -- skipping
refuses to work!! it did before and now it doesnt!

My httpd log directories are

var/log/httpd/site1/site1.accesslog

I have tried again to force rotation and Ive still got the silly big log file?!

thanks for your help Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Apache 2 Virtual Hosts not resolving

Hey all, I'm having some apache problems. I've installed apache countless times on FreeBSD. However, I'm having some problems and I could use some help. Here is my system info: FreeBSD 5.2.1 Apache 2.0.51 (/usr/local/apache2), doc root (/www symlink to /var/www) PHP 5.0.1 (/usr/local/php)... (2 Replies)
Discussion started by: ezekiel61
2 Replies

2. UNIX for Dummies Questions & Answers

Application & Virtual hosts in Apache

Folks; I need help knowing how to add an application to existing Virtual host on Apache. here's the details: I have a virtual host file (Based on IP address) for Apache and is configured to run application inside it. How can i add another application to the same virtual host based on the same IP... (0 Replies)
Discussion started by: moe2266
0 Replies

3. Shell Programming and Scripting

how to rotate log files

hi friends i need a shell script to rotate the logs in a directory, dated n days back. can anybody of help. appreciate.. (0 Replies)
Discussion started by: satya_skm
0 Replies

4. UNIX for Advanced & Expert Users

Virtual Hosts and Alteon DNS conflicts

Hi, This is more of a verification rather than a question of technical nature. This is based on solaris 10 machine Could we use Virtual hosts (within our hosts file): 123.1.1.10 virtual_host_name 123.1.1.10 host_A (note: 123.1.1.10 - host_A is also in our DNS server entry) And... (0 Replies)
Discussion started by: jackola
0 Replies

5. UNIX for Advanced & Expert Users

log rotate

hi , what is the meaning of log rotate? how do i rotate /var/adm/wtmps log and gzip it? (6 Replies)
Discussion started by: cromohawk
6 Replies

6. UNIX for Dummies Questions & Answers

Have to log out of a virtual terminal twice in order to exit virtual terminals

Not really a newbie, but I have a strange problem and I'm not sure how to further troubleshoot it. I have to log out of a virtual terminal by typing exit, then exit again as in: woodnt@toshiba-laptop ~ $ exit logout woodnt@toshiba-laptop ~ $ exit logout I DON'T have to do this when I'm... (1 Reply)
Discussion started by: Narnie
1 Replies

7. UNIX for Dummies Questions & Answers

Maximum Number of Virtual Hosts per Apache instance

Is there a directive to limit the number of virtual hosts allowed per apache instance? I am told yes but I cannot find it. (1 Reply)
Discussion started by: mojoman
1 Replies

8. Red Hat

apache httpd virtual hosts setup keep hitting the same VirtualHost

I'm trying to set up two virtual hosts. Here's my httpd config: <Directory /Users/userX/dev/sandbox-2> Order deny,allow deny from All Allow from localhost </Directory> NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "/Users/userX/dev/sandbox-2" ... (0 Replies)
Discussion started by: GlideK
0 Replies

9. UNIX for Dummies Questions & Answers

How to rotate the log messages?

Hi, i want to log rotate the /var/adm/messages file after reaching the specified limit and delete those logs. how do i do that. i you solaris 10 OS ,Please help me in doing the same.... (2 Replies)
Discussion started by: Rahulne25
2 Replies

10. Shell Programming and Scripting

Log rotate

Hi, I have below script in logrotate.d to rotate logs. logs are not rotating after the file grow to 1k, do you have any idea? Is it because of it just only 1K? Please let me know if the below syntax is in correct. # more trotate /sourcepath/*/servers/*/logs/*log... (2 Replies)
Discussion started by: lpprasad321
2 Replies
All times are GMT -4. The time now is 10:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy