Operating System & Version
CentOS v7.9.2009 STANDARD kvm
cPanel & WHM Version
110.0.10

Mthokozisi

Registered
Dec 2, 2022
3
0
1
Johannesburg
cPanel Access Level
Root Administrator
Greetings,

I manage a cPanel VM through the Google Cloud Platform. Yesterday I received an email that one of my domains was presenting a 502 error. I tried restarting (graceful reboot) the server as my main solution. The 502 error stopped and since I use webhooks for notification got one that httpd wont start and is down. I tried multiple solutions here on the forum, which included restarting httpd, which has been unsuccessful. I'm really not sure what to do anymore.

I ran this: /scripts/rebuildhttpdconf
Result: Initial configuration generation failed with the following message:

The “/usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf.work.b8097b34.cfgcheck -C Include "/usr/local/apache/conf.modules.d/*.conf"” command (process 13379) reported error number 1 when it ended.
httpd: Syntax error in -C/-c directive: Include/IncludeOptional: Could not open directory /usr/local/apache/conf.modules.d: No such file or directory

Rebuilding configuration without any local modifications.

Failed to generate a syntactically correct Apache configuration.
Bad configuration file located at /usr/local/apache/conf/httpd.conf.work.b8097b34
Error:
The “/usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf.work.b8097b34.cfgcheck -C Include "/usr/local/apache/conf.modules.d/*.conf"” command (process 13387) reported error number 1 when it ended.
httpd: Syntax error in -C/-c directive: Include/IncludeOptional: Could not open directory /usr/local/apache/conf.modules.d: No such file or directory


Also ran: /scripts/restartsrv_httpd
Result: Restart failed: timeout (196 seconds) reached! at /usr/local/cpanel/Cpanel/RestartSrv/Lock.pm line 37.

I'd appreciate your assistance.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,505
2,605
363
cPanel Access Level
Root Administrator
Hey there! That's definitely odd to me as we haven't used that file path in some time, and I confirmed on a test machine that /usr/local/apache/conf.d.modules doesn't exist in a CentOS 7/11.110 environment.

I would check and see if any of the include files in /etc/apache2/conf.d/includes are referencing that path. If so, comment out that line and then see if you can rebuild the configuration.

If that doesn't work, I would recommend submitting a ticket to our team so we can take a look at the system.