The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Installing SSL Certificate Error

Discussion in 'Security' started by dorac, May 13, 2015.

  1. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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? :)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. theRKF

    theRKF Registered

    Joined:
    Jun 7, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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".
     
Loading...

Share This Page