Apache fails to start after reboot due to missing /var/run/apache2 directory when SSL is enabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Binary package hint: apache2
For some reason after I rebooted my apache2 server the /var/run/apache2 directory disappeared. This directory is needed to support mod_ssl which makes use of it to store "SSLSessionCache" and "SSLMutex". Apache2 cannot be started with ssl enabled and the /var/run/apache2 is directory missing. It will log the following message
[Thu Jul 08 00:15:15 2010] [error] (2)No such file or directory: Cannot create SSLMutex with file `/var/run/
Configuration Failed
The solution is to recreat this directory. I am using the following code stub
[ -d /var/run/apache2 ] || mkdir /var/run/apache2
There are several solutions to this issue
1) Ensure /var/run/apche2 doesn't get deleted on reboot
2) Ensure startup scripts verify /var/run/apche2 exists and create it if missing
3) In /etc/apache2/
I also have run into this issue while using the OCF startup script included with the "heartbeat" package.
summary: |
Apache fails to start after reboot due to missing /var/run/apache2 - direcotry when ssl is enabled + directory when SSL is enabled |
This should be fixed since 2.2.4-2. Which version are you using?