Invalid Mutex directory in argument file:${APACHE_LOCK_DIR}

I ran into this once and this worked for me:

source /etc/apache2/envvars 
apache2 -V
sudo service apache2 restart

I haven't had the problem since.


That looks like you tried to start Apache by running something like

apache2

That doesn't work. Use

sudo service apache2 start

instead.


The correct answer is quite simple yet not obvious.

The apache2 service in Ubuntu/Debian uses the environment file /etc/apache2/envvars during its startup via apache2ctl restart or service apache2 restart.

In order to successfully show apache2 -V details just source the apache2 environment file:

# source /etc/apache2/envvars
# apache2 -V

There should not be any syntax error with the apache2.conf, since the environment variables shown in line 74 are automatically sourced by apache2 during its startup.

Tags:

Lamp

Apache2