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.

EasyApache build failed

Discussion in 'EasyApache' started by moha, Feb 18, 2013.

  1. moha

    moha Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I had new server, when i want to update apache i had this error:

    !! Failed to generate a syntactically correct Apache configuration (/usr/local/apache/conf/httpd.conf.1361188730):
    An error occurred while running: /usr/local/apache/bin/httpd -DSSL -t -f /usr/local/apache/conf/httpd.conf.1361188730
    Exit signal was: 0
    Exit value was: 1
    Output was:
    ---
    Syntax error on line 212 of /usr/local/apache/conf/modsec2.user.conf:
    SecRule takes two or three arguments, rule target, operator and optional action list
    ---

    !! If you want to create a support ticket with cPanel regarding this please reference 'BuildAP:mad:

    Report processed.
    !! Feel free to submit a support ticket at https://tickets.cpanel.net/submit/index.cgi?reqtype=tickets !!
    !! Verbose logfile is at '/usr/local/cpanel/logs/easy/apache/build.1361188057' !!

    so how can i fix this issues ?

    Thank you
    Best regards
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Sounds like you've got a modified file here:
    /usr/local/apache/conf/modsec2.user.conf

    What does it say on line 212, as the error mentions?
     
  3. moha

    moha Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    thank you for your fast replay
    in the line 212
    SecRule REQUEST_URI "!/ps(zones\|comp).txt1" chain "id:1234123561"
    regards
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Well, you could remark that line out, save and restart Apache, to see if that gets you going. But I suspect you've got more lines similar in there some reason or another. You might want to know about this thread posted recently:
    ModSecurity Changes in EasyApache 3.16 - cPanel Forums
     
  5. moha

    moha Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    sorry,
    i released the line 212 and restarted apache
    i tried to make update apache but i had the same error
    ----------------
    !! Failed to utilize existing Apache configuration file. Resetting Apache configuration to default. !!
    Updating Apache configuration
    Updating Apache configuration
    !! Updating Apache configuration for ModQos !!
    !! Failed to update httpd.conf for mod_qos !!
    !! Archiving successful build so it can be restored via --restore-archive once the httpd.conf are resolved !!
    !! 'safecopy(/usr/local/apache/etc, /usr/local/apache.ea3-buildok-confgen-failed)' did not return true !!
    !! '/usr/local/apache/conf/httpd.conf.1361199209' does not exist, using '/usr/local/apache/conf/httpd.conf' instead !!
    ------------
    any another idea?
    thank you
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    That's not the same error at all. You might consider selecting the Basic option:

    And get Apache Rebuilt. And then go back in and add to it as needed and rebuild a second time, as one suggestion. :)
     
  7. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    I would try this:

    rename modsec2.user.conf to modsec2.user.conf.BAK
    create an empty file:
    touch /usr/local/apache/conf/modsec2.user.conf

    restart Apache
    /etc/init.d/httpd -k graceful
    (Apache is now running without any mod_sec rules).

    If all well so far then run easyApache again, it should update modsec2.user.conf with valid rules.

    If it does not work you can still restore the old modsec2.user.conf
     
  8. moha

    moha Member

    Joined:
    Jul 15, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    thank you ,Infopro i tried your suggestion but still had the error

    thank you very much, quietFinn i did what you suggested and the issue was fixed, i completed the apache update successfully

    thanks for your help , God bless you
     
  9. ndennis

    ndennis Registered

    Joined:
    Jul 2, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem I ran easy apache today and now it won't complete and apache won't restart because of mod security
     
  10. cPanelJamyn

    cPanelJamyn Social Engineer
    Staff Member

    Joined:
    Jan 29, 2009
    Messages:
    105
    Likes Received:
    2
    Trophy Points:
    0
    Hi,

    There was a possibility that chained rules could be incorrectly parsed if one or more comment lines was placed in-between the first part of the chained rule, and the second half of the rule (FB63498). It sounds like the issue you're experiencing here. We fixed this issue in EasyApache 3.18.1.
     
Loading...

Share This Page