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.

2 problems regarding apache version & modeSecurity module

Discussion in 'EasyApache' started by geek4ever, Sep 23, 2011.

  1. geek4ever

    geek4ever Member

    Joined:
    Sep 23, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    First question :

    i updated cpanel to the latest release and i rebuilt apache using EasyApache BUT when i run :
    httpd -v
    it shows :
    Server version: Apache/2.2.3
    Server built: Jan 31 2011 17:49:25

    i believe it should be Apache/2.2.21 so why it's showing 2.2.3 ?!

    Second question :

    when i run the command :

    httpd -t

    it returns :

    httpd: Syntax error on line 40 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /usr/local/apache/conf/modsec2.conf: Cannot load /etc/httpd/modules/mod_security2.so into server: /etc/httpd/modules/mod_security2.so: undefined symbol: ap_get_server_banner

    WHILE

    - line 40 of /etc/httpd/conf/httpd.conf:

    Include "/usr/local/apache/conf/modsec2.conf"


    -line 3 of /usr/local/apache/conf/modsec2.conf:

    LoadModule security2_module modules/mod_security2.so

    i typed cat /etc/httpd/modules/mod_security2.so

    it returns something like that :

    ^?ELF^A^A^A^@^@^@^@^@^@^@^@^@^C^@^C^@^A^@^@^@`G^@^@4^@^@^@Ð%^E^@^@^@^@^@4^@ ^@^E^@(^@^\^@^Y^@^A^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^Ì^O^E^@^Ì^O^E^@^E^@^@^@^@^P^@^@^A^@^@^@^@^P^E^@^@^P^E^@^@^P^E^@$
    ^@^@^@^@^@^@^L^C^@^@^R^@^@^@^Ù^D^@^@^@^@^@^@+^@^@^@^R^@^@^@^À^B^@^@^@^@^@^@`^@^@^@^R^@^@^@L^E^@^@^@^@^@^@z^@^@^@^R^@^@^@^?^A^@^@^@^@^@^@^@^@^@^@^P^@^@^@<^B^@^@^@^@^@^@6^@^@^@^R^@^@^@Å^E^@^@$
    ^@^@^@^@^@^@V^@^@^@^R^@^@^@^Ú^@^@^@^@^@^@^@^@^@^@^@^P^@^@^@^Æ^B^@^@^@^@^@^@&^B^@^@^R^@^@^@^Ò^A^@^@^@^@^@^@^@



    Note: i installed mode security with EasyApache and i rebuilt it again and same problems appears

    Any help is appreciated

    Thanks.
     
  2. milind

    milind Well-Known Member

    Joined:
    Jan 15, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Nasik (Maharashtra), India
    cPanel Access Level:
    Root Administrator
    it seems that modsec is not properly installed (not sure).
    please
    1) recompile apache without modsec and try to
    2) recompile again with modsec (make sure there shouldn't be any modsec rules or conf includes for modsec.

    I hope someone from cpanel replies to this...
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Some details missing here I think. I've just updated my EDGE tier server (CentOS) and here's what I see:

    [root /]# httpd -v
    Server version: Apache/2.2.21 (Unix)
    Server built: Sep 24 2011 06:13:51

    What operating system is on this server?

    Apache 2.3 is beta according to this page: Welcome! - The Apache HTTP Server Project

    cPanel would never push out a beta version on its users that I"m aware of. So, there's something different about this server thats not been mentioned in your post.
     
  4. geek4ever

    geek4ever Member

    Joined:
    Sep 23, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    i am running CentOS 5.7 (final)

    and WHM 11.30.3 (build 5)

    uname -a :
    Linux server.website.com 2.6.18-028stab091.2 #1 SMP Fri Jun 3 00:02:40 MSD 2011 i686 i686 i386 GNU/Linux

    i tried to update
    /scripts/upcp --force

    then recompiled apache ... nothing changed .

    /scripts/easyapache --latest-versions

    Easy::Apache v3.6.2

    [Apache]
    1.3.42, 2.0.64, 2.2.21

    [PHP 4]
    4.4.6, 4.4.7, 4.4.8, 4.4.9

    [PHP 5]
    5.2.9, 5.2.17, 5.3.6, 5.3.8



    Anything else you would like to know ?
     
    #4 geek4ever, Sep 24, 2011
    Last edited: Sep 24, 2011
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Just one, and its the same question you have I suppose.

    How did a beta version of Apache get on your server if it did not come via EasyApache, and by your details posted, shouldn't be on the system at all.

    Lets call it a defect and send you here to let cPanel know about it:
    http://go.cpanel.net/bugs

    Please link them to this thread so they can see your posts, thanks!
     
  6. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    InfoPro,

    Where does it state above that it's a beta version? He/she said Apache 2.2.3, not Apache 2.3.

    It looks like the OP must have compiled Apache but the compilation must have failed, or the install of the new compile failed, leaving them with some old version they must have been running [2.2.3].

    M
     
  7. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You are correct, read it wrong. :/
     
  8. geek4ever

    geek4ever Member

    Joined:
    Sep 23, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Yes it's 2.2.3 not 2.3, anyways i need to upgrade my apache to the latest version that's what i need!
    I checked the update log and there wasn't any errors . BUILD IS COMPLETE " or something similar ".

    more details :

    php -v

    PHP 5.2.17 (cli) (built: Sep 24 2011 07:28:58)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
    with the ionCube PHP Loader v4.0.9, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
    with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

    httpd -v

    Server version: Apache/2.2.3
    Server built: Jan 31 2011 17:49:25

    Now the weird thing here that httpd -v displays server built : Jan 31 2011 WHILE php -v displays Sep 24 2011 !!

    Is there any logical justification to this ?

    Anyone else faced the mod_security issue or the apache update ?

    is there another command to check my apache version ?
     
    #8 geek4ever, Sep 25, 2011
    Last edited: Sep 25, 2011
  9. frisbees

    frisbees Member

    Joined:
    Feb 26, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Did you ever get this fixed. I'm having the same issue.
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    The issue is the command you are using. If /usr/sbin/httpd isn't symlinked to /usr/local/apache/bin/apachectl binary, then you get bad results. The cPanel Apache is at /usr/local/apache/bin/apachectl location and that's the correct one to check:

    Code:
    /usr/local/apache/bin/apachectl -v
    /usr/local/apache/bin/apachectl -t
    To fix the httpd command pulling from the wrong binary, you can move the bad one and symlink it properly:

    Code:
    mv /usr/sbin/httpd /usr/sbin/httpd.bak
    ln -s /usr/local/apache/bin/apachectl /usr/sbin/httpd
    At that point, the "httpd" shortname should be usable for those commands and it should be pointing to the correct cPanel installation of Apache.
     
Loading...

Share This Page