Symptoms
-
Apache fails to start, and
/scripts/restartsrv_httpdreturns the following error:CONFIG_TEXT: AH00526: Syntax error on line 159 of /etc/apache2/conf/httpd.conf:
Invalid Mutex directory in argument file:/run/apache2 -
Running
/usr/local/cpanel/scripts/rebuildhttpdconffails with the following error:CONFIG_TEXT: Configuration problem detected on line 152 of file /etc/apache2/conf/httpd.conf.work.xxxxxxx:
Invalid Mutex directory in argument file:/run/apache2
152 ===> Mutex file:/run/apache2 rewrite-map <===
Cause
The directory /run/apache2 specified in the Mutex directive, does not exist on the server. This is known to occur when a cPanel ELevate upgrade fails partway through, leaving some system users and groups incomplete.
Resolution
- Log into the server via SSH
-
Check whether the
nobodygroup exists:# getent group nobody
-
If the command returned no output, create a backup copy of the group files:
# cp -a /etc/group /etc/group.bak
# cp -a /etc/gshadow /etc/gshadow.bak -
If the command returned no output, create the group:
# groupadd nobody
-
Create the missing directory and set its group and permissions:
# mkdir /run/apache2
# chgrp nobody /run/apache2/
# chmod 710 /run/apache2/ -
Rebuild the Apache configuration and confirm it completes successfully:
# /usr/local/cpanel/scripts/rebuildhttpdconf
Note: The following is returned on successful rebuild:
Built /etc/apache2/conf/httpd.conf OK
Comments
0 comments
Article is closed for comments.