HostOnNet Blog

Installing mod_security in Plesk server

Looking for Linux Server Admin or WordPress Expert? We can help.

Today i installed mod_security on a Plesk server, it is easy in cpanel box, but in Plesk, found there is no apxs in path. So i have run a find

[root@plesk tmp]# find / -name apxs
/usr/local/psa/admin/bin/apxs
[root@plesk tmp]#

But this apxs is of Apache used by Plesk. Plesk runs its own Apache as it run as privelaged user.

apxs is not installed for Apache used by websites hosted on plesk server. This can be installed by installing httpd-devel package. So installed it with up2date

[root@plesk httpd]# up2date -i httpd-devel
Fetching Obsoletes list for channel: rhel-i386-es-3…
Fetching Obsoletes list for channel: rhel-i386-es-3-extras…
Fetching Obsoletes list for channel: rhel-i386-es-3-devsuite…
Fetching rpm headers…############

Name Version Rel—————
—-httpd-devel 2.0.46 56.ent i386
Testing package set / solving RPM inter-dependencies…

########################################
httpd-devel-2.0.46-56.ent.i
##########################
Done.Preparing
#############################
############## [100%]
Installing… 1:httpd-devel #######

##################################
## [100%]
[root@plesk httpd]#

After doing this, mod_security got installed as usual.

This was Apache 2 server. So

# cd

Now download latest version of mod_security from

http://www.modsecurity.org/

# tar -zxvf modsecurity-apache-1.9.2.tar.gz
# cd modsecurity-apache-1.9.2
# cd apache2
# apxs -cia mod_security.c

Now added mod_security rule to httpd.conf

Restarted apache and mod_security installation is finished.

Posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.