2 problems regarding apache version & modeSecurity module

geek4ever

Member
Sep 23, 2011
9
0
51
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.
 

milind

Well-Known Member
Jan 15, 2006
113
0
166
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...
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
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.
 

geek4ever

Member
Sep 23, 2011
9
0
51
cPanel Access Level
Website Owner
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 tried to recompile it without mode sec and recompile again with modesec same problem appears .
i didn't add any rules or inculdes.
I hope someone from cpanel replies to this...
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.
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 ?
 
Last edited:

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
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!
 

mtindor

Well-Known Member
Sep 14, 2004
1,463
114
193
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
 

geek4ever

Member
Sep 23, 2011
9
0
51
cPanel Access Level
Website Owner
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!
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!
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
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 ?
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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.