Symptoms
Starting or rebuilding Apache fails with errors similar to this:
Syntax error on line 33 of /etc/apache2/conf.d/jason/rules.conf:
Error creating rule: Could not open phrase file
"/etc/apache2/conf.d/jason/modec.data": No such file or directory
You'll also see that Apache or the httpd service is down and fails to start.
Description
Whenever you see an Apache syntax error, followed by an error that says "No such file or directory," it typically means that a file that is being referenced in the httpd.conf or another included file no longer exists. It may have been removed accidentally, by a filesystem issue, or there was an issue from the custom software that added the configuration (assuming custom).
Workaround
You will want to back up the configuration and edit the first file referenced in the error. Typically, you can comment out the line (or a few lines if needed) that references the missing file, then rebuild and restart Apache with the following commands as root:
/usr/local/cpanel/scripts/rebuildhttpdconf
/usr/local/cpanel/scripts/restartsrv_httpd
After getting Apache back up and running, you should look into which file(s) is missing and how to go about replacing it. Sometimes this means installing or reinstalling software, or simply removing the old configuration.
Comments
0 comments
Article is closed for comments.