LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   apache2 replaces apache1 in slack current (https://www.linuxquestions.org/questions/slackware-14/apache2-replaces-apache1-in-slack-current-555710/)

Chuck56 05-22-2007 12:20 AM

apache2 replaces apache1 in slack current
 
I noticed in the latest changelog that httpd-2.2.4 replaced apache-1.3.37 in slack current on 5/19/07? I have been checking out the apache2 ProxyPreserveHost command for my virtual hosts on a secondary internal server. I'm ready to make the jump. Anybody else?

General Failure 05-23-2007 09:36 AM

Hehe. I already wondered if this one would stay in slack forever due to its 1337n355 :D

d-ra 05-23-2007 09:54 AM

/etc/logrotate.d/httpd
 
Be aware of the /etc/logrotate.d/httpd file:
Code:

/var/log/httpd/* {
  rotate 10
  size=5M
  compress
  delaycompress
  sharedscripts
  postrotate
    /etc/rc.d/rc.httpd restart
  endscript
}

The filter /var/log/httpd/* will end up in a recursion. This filter matches not only the logfiles like *_log, it matches the shifted archives too. After some logrotate -f you will see:
Quote:

-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.1.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.1.1.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.1.1.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.1.2.gz
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.1.2.gz.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.1.3.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.2.gz.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.2.gz.1.1
-rw-r--r-- 1 root root 33 2007-05-21 20:39 access_log.1.2.gz.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.3.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.1.3.gz.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.1.4.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz.1
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz.1.1
-rw-r--r-- 1 root root 20 2007-05-21 20:39 access_log.2.gz.1.1.1
-rw-r--r-- 1 root root 33 2007-05-21 20:39 access_log.2.gz.1.2.gz
-rw-r--r-- 1 root root 0 2007-05-21 20:39 access_log.2.gz.2.gz
Funny, isn't it? My patch:
Code:

/var/log/httpd/*_log {
  rotate 10
  size=5M
  compress
  delaycompress
  sharedscripts
  postrotate
    /etc/rc.d/rc.httpd restart
  endscript
}

Important: var/log/httpd/*_log or another suffix - depends on what you have chosen as log filenames.

rworkman 05-23-2007 10:00 AM

d-ra:
Another solution for this is to add the 'olddir' parameter to the logrotate file (specify a directory relative to /var/log/httpd to place the rotated logs in and create the directory manually).


All times are GMT -5. The time now is 05:02 PM.