Link to home
Start Free TrialLog in
Avatar of uk1900
uk1900

asked on

check if mod_evasive is installed

hi,

I installed mod_evasive but its seem to work,
how can I check if it installed in my sever?
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

I'm not sure if I understand the question, but can't you simply modprobe it? It will not be loaded again if already loaded, and you will get an error if it's not installed.
Avatar of uk1900
uk1900

ASKER

hi,
I wrote this line in SSH :
 /sbin/modprobe -v mod_evasive20.
 and I didnt get any error,

I guess the problem is about the way I added the configuration  to httpd.conf
<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 6
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600
</IfModule>

I can not edit httpd.conf directly! how normaly u do that?
You can do a modprobe with no error - you must therefore have been able to become root. How then can't you edit httpd.conf?
I don't run httpd myself so can't really help with the config details.

You can test the success / failuer of a command (e.g. modprobe) in a script:

modprobe mod_evasive20
result=$?
if [ result];then
echo "mod_evasive20 is installed"
else
echo "mod_evasive20. NOT installed"
fi

You have the "result" variable to check later for further action, if required
Avatar of uk1900

ASKER

I can not edit httpd.conf  becasue the system doesnt allow me to
yes I can open httpd.conf but when I click on submit the entire file is ruined and the apache wont start!


modprobe mod_evasive20
result=$?
if [ result];then
echo "mod_evasive20 is installed"
else
echo "mod_evasive20. NOT installed"
fi

Open in new window

Avatar of uk1900

ASKER

I didnt get your code snippet!

any way I know mod_evasive is installed ,but I still dont know how to includde the configuration
What editor are you using to try to edit httpd.conf? vi does not have a submit button.
Avatar of uk1900

ASKER

I try to update the the file (/etc/httpd/conf/httpd.conf) using the control panel in Virtuozzo:
http://xs432.xs.to/xs432/08425/temp439.png

is this the right file I have to uodate, and what is the proper way to do that?
That control panel editor looks fine. Are you saying that if you so much as invoke it and submit ten things go haywire?
The displayed file is all comments. Is that what the real file looks like? (I.e. in a Terminal window, does it match output from "cat /etc/httpd/conf/httpd.conf"?).
If there is a mismatch, use a text editor (such as vi) to edit the real file. Be sure to copy it to a backup location first.
Avatar of uk1900

ASKER

hi duncan_roe,

I didnt understand your code in the Code Snippet !

modprobe mod_evasive20
result=$?
if [ result];then
echo "mod_evasive20 is installed"
else
echo "mod_evasive20. NOT installed"
fi

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial