Failed to generate a syntactically correct Apache configuration

albatroz

Well-Known Member
Mar 6, 2003
401
6
168
Virtual Orbis / Peru
cPanel Access Level
Root Administrator
Twitter
I recently purchased the Config Server modsecurity service, however I am having an issue when I try disable modsecurity for a particular domain or disable a particular rule.

I get the error message of this picture - Removed -
and the rules are never disabled, so the only option I have when a problem with a modsecurity rule
appears is to disable mod security completely.

I asked Configserver support and they sent me the following response.

What do you think?

>>>>>>>>>>>>>

That is an issue with either cPanel or CloudLinux as all that cmc does is run:

/scripts/buildhttpdconf

It is that cPanel provided script that is creating the include of /usr/local/apache/conf/conf.d/*.conf for some reason. You would have to seek support from cPanel as to why that script is doing that.

As a workaround you could create the directory using:

mkdir -p /usr/local/apache/conf/conf.d/

Then create an empty file called something.conf within that directory, to get around the error, but the cause should really be investigated. That is not something that we can help with.
rstrtlgln43.png
 
Last edited by a moderator:

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
Does /usr/local/apache/conf/conf.d even exist? I am pretty sure that isn't something cPanel has by default. Does ConfigServer say they use that directory
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
807
160
168
New Jersey
cPanel Access Level
DataCenter Provider
Hmm it looks like that directory is used with CloudLinux when using mod_lsapi
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello :)

Are you able to reproduce the issue when running the "/scripts/rebuildhttpdconf" command on this system?

Thank you.