Some questions about Apache logs rotation...

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
15,449
Location
www.poralix.com
How does directadmin send SIGTERM to Apache on log rotation?

Hello,

We have a frontend to apache, thus we've made our frontend to log bytes and visits to default for virtual hosts apache logs:

/var/log/httpd/domains/domain.log
/var/log/httpd/domains/domain.bytes

and switched them off in apache's conf.

So the question is, how does directadmin send a signal to apache after log rotation? Does it use a "kill", something like:

Code:
/bin/kill -HUP `cat /var/run/httpd.pid`

or

Code:
/bin/kill -SIGTERM `cat /var/run/httpd.pid`

or use "/sbin/service"?

Code:
/sbin/service httpd restart

In apache's logs, there is a line:

[Mon Oct 25 01:04:01 2010] [notice] caught SIGTERM, shutting down

So via a "kill" or a "service" script does directadmin send SIGTERM?

We need to restart our frontend after the log rotation.
 
Last edited:
Found out myself.

Directadmin uses

Code:
/sbin/service httpd restart

to restart apache on finish with log rotation.
 
Back
Top