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

Bug #875883 reported by Gregory Gleason on 2011-10-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Low
Unassigned

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.
                                                                         [fail]

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
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apache2
UpgradeStatus: No upgrade log present (probably fresh install)

Gregory Gleason (gsgleason) wrote :
Gregory Gleason (gsgleason) wrote :

Umm..Oops.

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
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
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  Edit
Everyone can see this information.

Other bug subscribers