Installing SSL Certificate Error

dorac

Member
Jun 7, 2013
22
4
3
South Africa
cPanel Access Level
Root Administrator
Hi guys,

Trying to install a self-signed certificate on a domain, however I keep getting this error:

Code:
AH00548: NameVirtualHost has no effect and will be removed in the next release /var/tmp/28036.WHOSTMGR_BIN_XML_API_PL__.pnzmfN2xLtDJcA7x.tmp:1986 AH00526: Syntax error on line 4 of [Test Configuration File]: Invalid command 'MaxRequestLen', perhaps misspelled or defined by a module not included in the server configuration
I found in another post to try:

Code:
/scripts/rebuildhttpdconf
And I get the following:

Code:
info [rebuildhttpdconf] Missing IP for domain localhost.localdomain, using 154.0.163.133
info [rebuildhttpdconf] Missing ServerName for domain localhost.localdomain, using localhost.localdomain
info [rebuildhttpdconf] Missing port for domain localhost.localdomain, using 80
info [rebuildhttpdconf] Missing user for domain localhost.localdomain, using nobody
info [rebuildhttpdconf] Missing owner for domain localhost.localdomain, force lookup to root
info [rebuildhttpdconf] Missing group for domain localhost.localdomain, using nobody
Built /usr/local/apache/conf/httpd.conf OK
I found another post that said to try:

Code:
/scripts/rebuilddnsconfig
Which completes with no problems and upon trying the rebuildhttpdconf script again I'm greeted with the same errors. Another note - it's not a custom httpd.conf file.

Help? :)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
Hello,

What version of cPanel is installed on your system? Is the SSL certificate working? The output from /scripts/rebuildhttpdconf does not show anything that would prevent the certificate from installing or cause any problems with your websites loading.

Thank you.
 

dorac

Member
Jun 7, 2013
22
4
3
South Africa
cPanel Access Level
Root Administrator
Hi Michael, WHM 11.48.4

Created a ticket and has been resolved. The solution:

Code:
Looking through your configuration, I noticed that "MaxRequestLen" is defined on two of your modsec.conf includes specifically for printcanvas.co.za - one for SSL and one for non-SSL:

------------------------------------------------------------
./userdata/std/2/printfyc/printcanvas.co.za/modsec.conf:#MaxRequestLen 15728640
./userdata/ssl/2/printfyc/printcanvas.co.za/modsec.conf:MaxRequestLen 15728640
------------------------------------------------------------

I do see that the non-SSL MaxRequestLen was commented out already, but it looks like the SSL modsec.conf entry did not get commented out, and was triggering the syntax error. I've gone ahead and commented this for you, and I can confirm that the SSL is installing successfully now.

Let me know if you continue to run into any issues, or if you have any other questions at all for us - we're happy to help out.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,222
463
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
 

theRKF

Registered
Jun 7, 2012
3
0
51
cPanel Access Level
Root Administrator
In case anyone else comes across this post via Google as I did, here's some additional info.

I was trying to install an SSL cert and got this error:
Code:
Syntax error on line 22873 of [test configuration file]

rewriterule: bad flag delimiters
The problem was related to some redirects in my httpd.conf file. I had this:
Code:
[R=301, L]
The problem was the space before the "L".