Last week I had a very boring problem on a production server :
As my box / partition was near to saturation I had to quickly get back some space,
the easiest way for me was to remove big and unused files from /var/log...
Doing so, I suppressed a directory containing logfiles which seemed unused to me...
But in fact these files were configured as ErrorLog for an old testing virtual server which I didn't used anymore
and I even didn't remember that this directory was used by Apache.
I did this on Friday afternoon and didn't notice anything bad right after that.
But back to work the next Monday, I realized that all my websites had been down for all the week-end !
The logrotate had made his job at 6h30 : stop apache, rotate the logs, then restart apache, but apache never restarted, throwing a
"could not open error log file" but none was here at this moment to see it.
So I think that when apache cannot open nor create a logfile It should throw a warning but It should not prevent apache from running,
furthermore, when I noticed on Monday that my websites were down, I first tried :
which answered : Syntax OK
perhaps configtest should double check that the logfiles mentionned in config files are present on disk.
-- Package-specific info:
List of enabled modules from 'apache2 -M':
actions alias asis auth_basic auth_digest authn_file authz_default
authz_groupfile authz_host authz_user autoindex cgi dir env filter
headers include* info mime_magic mime mxslt negotiation perl php5
rewrite setenvif speling ssl status
(A * means that the .conf file for that module is not enabled in
Kernel: Linux 2.6.18-6-686 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages apache2 depends on:
ii apache2-mpm-prefork 2.2.9-10+lenny2 Apache HTTP Server - traditional n
apache2 recommends no packages.
apache2 suggests no packages.
Versions of packages apache2.2-common depends on:
ii apache2-utils 2.2.9-10+lenny2 utility programs for webservers
ii libapr1 1.2.12-5 The Apache Portable Runtime Librar
ii libaprutil1 1.2.12+dfsg-8 The Apache Portable Runtime Utilit
ii libc6 2.7-18 GNU C Library: Shared libraries
ii libmagic1 4.26-1 File type determination library us
ii libssl0.9.8 0.9.8g-15 SSL shared libraries
ii lsb-base 3.2-20 Linux Standard Base 3.2 init scrip
ii mime-support 3.44-1 MIME files 'mime.types' & 'mailcap
ii net-tools 1.60-22 The NET-3 networking toolkit
ii perl 5.10.0-19 Larry Wall's Practical Extraction
ii procps 1:3.2.7-11 /proc file system utilities
ii zlib1g 1:22.214.171.124.dfsg-12 compression library - runtime