Solved

How to install mod security on Centos

Posted on 2008-10-15
4
1,246 Views
Last Modified: 2012-05-05
Hi X-perts,

I have a new Centos server, which is all new for me (I have been using freebsd n the past). How can I install a security mod from

http://www.jasonlitka.com/media/EL4/x86_64/

I do not want to install and update the whole Yum Repository, but would rather to install only a single mod security now.

Please, tell me the exact list of commands how to do it (I have never used yum before). Should I first import the public key?

Please, help
0
Comment
Question by:andy7789
  • 2
4 Comments
 
LVL 9

Expert Comment

by:chingmd
ID: 22728313
run the following commands as root

You will need to enable the jasonlitka repository.  here is a howto to set that up.  
http://www.jasonlitka.com/yum-repository/

yum check-update
   only updates the the repository

then run

yum search mod_security
    should return a result

then run
yum install mod_security






0
 

Author Comment

by:andy7789
ID: 22728800
all works - all installed. Do you know where should I edit httpd.conf to include a reference to mod security?

The manual for mod security states:
===========================================
Edit the main Apache httpd config file (usually httpd.conf)
On UNIX (and Windows if you did not copy the DLLs as stated above) you must load libxml2
and lua5.1 before ModSecurity with something like this:

LoadFile /usr/lib/libxml2.so
LoadFile /usr/lib/liblua5.1.so

Load the ModSecurity module with:
LoadModule security2_module modules/mod_security2.so
=========================================

The problem is that I cannot find references as "LoadFile /usr/lib/liblua5.1.so" in the conf file. Where should I place it?
0
 
LVL 9

Accepted Solution

by:
chingmd earned 500 total points
ID: 22732225
You can add the LoadModule line with the others in the file.

The LoadFile line is may only be location specific for the module, so place it above the LoadModules section of the httpd.conf file.  

But in most cases, most of the options in httpd.conf are not location specific.
0

Featured Post

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now