Failed to start apache

Since upgrading from Ubuntu 12.04 to 14.04.2, I recive the following error when attempting to start apache2:

Failed to start apache :

  • Starting web server apache2
  • The apache2 configtest failed.
    Output of config test was:
    AH00526: Syntax error on line 57 of /etc/apache2/apache2.conf:
    Invalid command ‘LockFile’, perhaps misspelled or defined by a module not included in the server configuration
    Action ‘configtest’ failed.
    The Apache error log may have more information.

As a temporary fix, I commented out the line

LockFile /var/lock/apache2/accept.lock

and replaced it with

Mutex file:${APACHE_LOCK_DIR} default

and added the folder /run/lock/apache2/ssl_mutex

However, I ran updates and the problem reoccurred.
Any sugestions?


It looks like you performed the correct fix for that.

However, Apache/PHP shouldn’t change your Apache config file once the upgrade is complete.

Is the error you’re receiving now referring to that same line, or is it possible it’s another part of Apache causing the issue?