apache2 cannot start because /var/log/apache2/ doesn't exist

Bug #875883 reported by Gregory Gleason
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)

Bug Description

New install of apache2 on ubuntu 11.10. Tried to start it, with apachectl or service command, and it fails.

$ sudo service apache2 start
 * Starting web server apache2 (2)No such file or directory: apache2: could not open error log file /var/log/apache2/error.log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.

I created the directory and it starts fine now.

The apache2 package install should create this directory so the user doesn't have to.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apache2 2.2.20-1ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Sun Oct 16 11:59:23 2011
 PATH=(custom, user)
SourcePackage: apache2
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Gregory Gleason (gsgleason) wrote :
Revision history for this message
Gregory Gleason (gsgleason) wrote :


I had my logging going to a tmpfs to decrease SSD wear.

However, this is the only service that fails to start.

Would it be worth while having the init script for apache2 check to see if /var/log/httpd exists and create it otherwise? That should be a simple 'fix'

Changed in apache2 (Ubuntu):
status: New → Invalid
status: Invalid → New
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Indeed, that does sound worthwhile, and should be done. Thanks for the report!

Changed in apache2 (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
status: Confirmed → Triaged
Revision history for this message
ripounet (rip0320) wrote :

Same problem, same TMPFS explanation -> thank you Gregory

Fixing would be nice indeed -> thank you Serge

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers