Limit Connections per IP using mod_limitipconn on cPanel

Started on the old forum in August 2012 · view the original in the archive · old links redirect here

#apache-connections #limit-connections #limit-per-ip #limit-server-connection

1 reply · 694 views · started 14 years ago · 1 min read

2 participants
Sanju Kr Developer · 104 posts #1

one of the problems mainly aries on cPanel servers that some people use download managers to download files from server , so hundreds of connections were being ESTABLISHED to Apache and it was becoming like a dos attack and causing Apache to become non responsive. so here is solution to limit connections per IP in a cPanel hosting server : there is an Apache module named mod_limitipconn which will take care of it for us. first download the latest version of mod_limitipconn from this site : mod_limitipconn.c decompress and install it.

wget http://dominia.org/djao/limit/mod_limitipconn-0.24.tar.bz2
tar jxvf mod_limitipconn-0.24.tar.bz2
cd mod_limitipconn-0.24
/usr/local/apache/bin/apxs -cia mod_limitipconn.c

next step is to add the required configuration to the Apache config file , we can add this directly to the end of httpd.conf file but the problem is that if we do this , the httpd.conf will be overwritten by easyapache so we will use include files to add our config. login into your WHM panel , and follow the following menu items : Main >> Service Configuration >> Apache Configuration >> Include Editor on the Post VirtualHost Include section , choose All Versions from drop down menu and add the following config into it :

<IfModule mod_limitipconn.c>
<Location />
MaxConnPerIP 10
NoIPLimit images/*
</Location>
</IfModule>
analyzer Developer · 104 posts #2

This will help me a lot.. Thank you brother..

It's n0t that i am afraid to die. Its just that if i die, wh0 wilL loVe her as muCh as i Do?

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close