How-To: Install Manually mod_limitipconn For Apache

Installing mod_limitipconn.c
http://dominia.org/djao/

Intro

This is the distribution page for the Apache module mod_limitipconn.c, which
allows web server administrators to limit the number of simultaneous
downloads permitted from a single IP address.

Why did I write this module? Well, I run an mp3 server which since its
inception was being constantly hosed by people who were trying to download
dozens of files at once. For months I scoured the Internet looking for a
code snippet that would solve this problem. The closest thing I found was this
patch against an old version of Apache, and it didn’t run properly on my Linux box
(that was back then; nowadays, the patch doesn’t even apply cleanly to the
Apache source tree).

Finally I gave up and decided to write something to do the job myself, and
here’s the result.

Log into ssh

(Apache 1.3.x) -
cd /usr/src
http://dominia.org/djao/limit/mod_limitipconn-0.04.tar.gz
tar xzvf mod_limitipconn-0.04.tar.gz
cd mod_limitipconn-0.04

(Apache 2.0.x)
cd /usr/src
http://dominia.org/djao/limit/mod_limitipconn-0.22.tar.gz
tar xzvf mod_limitipconn-0.22.tar.gz
cd mod_limitipconn-0.22

pico Makefile
find the line that reads APXS=apxs
change that to
APXS=/usr/local/apache/bin/apxs

press cntrl O to save
then cntrl X

// if your locations to apxs is different
locate apxs and copy the path
then paste that in
//

make
make install

service httpd restart

pico -w /etc/httpd/conf/httpd.conf

locate ExtendedStatus
Make sure ExtendedStatus is on and without the comment at the start

and add this line to every virtual directory you want to limit
or add it once to the main directory to limit all

MaxConnPerIP 3

exempting images from the connection limit is often a good

idea if your web page has lots of inline images, since these

pages often generate a flurry of concurrent image requests

NoIPLimit image/*

MaxConnPerIP 1

In this case, all MIME types other than audio/mpeg and video*

are exempt from the limit check

OnlyIPLimit audio/mpeg video

press cntrl O to save
then cntrl X
then service httpd restart

When i try it i have limit /download location and works really good.

Credit : Born2Kill
hxxp://forums.sagonet.com/index.php?topic=2833.0

mod_bandwidth http://www.cohprog.com/mod_bandwidth.html
mod_throttle http://www.snert.com/Software/mod_throttle/
mod_choke http://os.cyberheatinc.com/mod_choke.php
mod_cband http://dembol.nasa.pl/mod_cband
mod_bwshare http://www.topology.org/src/bwshare/README.html
mod_bw http://bwmod.sourceforge.net/
mod_limitipconn http://dominia.org/djao/limitipconn.html

ไอ้ผมยังติดตั้ง mod_limitipconn ไม่ได้เลยครับไม่รู้ทำอะไรผิด
make
make install ปกติไม่มี error เลยครับ
แต่สั่ง restart httpd service ไม่ขึ้นซะงั้น
ไม่มี error ใน error log
ลองทั้ง mod_limitipconn-0.22.tar.gz - 23

[root@ns3 mod_limitipconn-0.22]# httpd -v
Server version: Apache/2.0.63

[root@ns3 mod_limitipconn-0.22]# service httpd restart
Stopping httpd:

Instructions for building as a Dynamic Shared Object (DSO):

tar xjvf mod_limitipconn-0.23.tar.bz2
cd mod_limitipconn-0.23
make install

ผมลองแล้วมันเป็นแบบนี้หนะึครับ

[quote][root@ns3 mod_limitipconn-0.22]# make install
apxs -c


chmod 755 /usr/lib/apache/mod_limitipconn.so
[activating module `limitipconn’ in /etc/httpd/conf/httpd.conf]
root@dns1:~/mod_limitipconn-0.23# /etc/init.d/httpd restart
Stopping httpd:
Remaining processes: 7567 7568 7682 7683 7684 7685 7686 7687 7689 7691 7694 7695 7696 7698 7699 7701 7703 7704 7705 7706 7707 7715 7718 7720 7727 7729 7730 7731 7732 7733 7735 7737 7738 7739 7740 7741 7742 7743 7744 7745 7746 7747 7748 7765 7770 8902
Stopping httpd:
Starting httpd:
root@dns1:~/mod_limitipconn-0.23#

ผมติดตั้งผ่านนะ

[quote author=MeaN link=topic=24907.msg237781#msg237781 date=1261308736]
[root@ns3 mod_limitipconn-0.22]# service httpd restart
Stopping httpd:

HOWTO: Limit Ip connections
Installing mod_limitipconn.c
http://dominia.org/djao/

Intro

This is the distribution page for the Apache module mod_limitipconn.c, which
allows web server administrators to limit the number of simultaneous downloads
permitted from a single IP address.

Why did I write this module? Well, I run an mp3 server which since its
inception was being constantly hosed by people who were trying to download
dozens of files at once. For months I scoured the Internet looking for a code
snippet that would solve this problem. The closest thing I found was this patch
against an old version of Apache, and it didn’t run properly on my Linux box
(that was back then; nowadays, the patch doesn’t even apply cleanly to the
Apache source tree).

Finally I gave up and decided to write something to do the job myself, and
here’s the result.

Log into ssh

cd /usr/src
wget http://dominia.org/djao/limit/mod_li...nn-0.04.tar.gz
tar xzvf mod_limitipconn-0.04.tar.gz
cd mod_limitipconn-0.04

pico Makefile
find the line that reads APXS=apxs[/b]
change that to
APXS=/usr/local/apache/bin/apxs

press cntrl O to save
then cntrl X

// if your locations to apxs is different
locate apxs and copy the path
then paste that in
//

make
make install

service httpd restart

pico -w /etc/httpd/conf/httpd.conf

locate ExtendedStatus
Make sure ExtendedStatus is on and without the comment at the start

and add this line to every virtual directory
you want to limit
or add it once to the main directory to limit all

<IfModule mod_limitipconn.c>
<Location /somewhere>
MaxConnPerIP 3

exempting images from the connection limit is often a good

idea if your web page has lots of inline images, since these

pages often generate a flurry of concurrent image requests

NoIPLimit image/*
</Location>

<Location /mp3>
MaxConnPerIP 1

In this case, all MIME types other than audio/mpeg and video*

are exempt from the limit check

OnlyIPLimit audio/mpeg video
</Location>
</IfModule>

press cntrl O to save
then cntrl X
then service httpd restart

Credit Thx : Blueheaven

ผมก็ไม่รู้เหมือนกันว่าเพราะเหตุอันใด T_T

apache 1.3 or 2.x

[root@ns3 mod_limitipconn-0.22]# httpd -v
Server version: Apache/2.0.63

ครับ ลอง 0.22 / 0.23 เป็นคือกันเลยครับ
เดี่ยวหาโอกาสลองใหม่ครับเดี่ยวผมต้องเดินทาง ขอบคุณพี่่มากครับ ^^’

os อะไรครับ
ลองติดตั้ง libapache พวก dev ด้วยครับ

wget http://dominia.org/djao/limit/mod_limitipconn-0.23.tar.bz2
tar jxvf mod_limitipconn-0.23.tar.bz2
cd mod_limitipconn-0.23
apxs -cia mod_limitipconn.c