Limit the number of Apache connections with the same ip address

Source: Internet
Author: User

Many times there will be boring people, or your website is very popular, and you do not want each user to open a lot of connections at the same time.

This article describes a method to limit the number of connections of each user.

This article is based on Centos4/Redhat:

Install the official website mod_limitipconn:Http://dominia.org/djao/limitipconn2.html

Centos4/Redhat has an rpm package, which is easy to install. (Mod_limitipconn limits the number of ip connections)


Installation Method:
Rpm-ivh mod_limitipconn-0.23-4.el4.i386.rpm

Check the installation location:

Configuration method:

Vim httpd. conf

The changes are as follows:

ExtendedStatus On

Add a new module

LoadModule limitipconn_module modules/mod_limitipconn.so

<IfModule mod_limitipconn.c>
<Location/>
MaxConnPerIP 15 ### limit that each ip Address can have up to 15 links
</Location>
</IfModule>
For more information, see

/Usr/share/doc/mod_limitipconn-0.23/README
For how to install the source code, see the Help file on the official website.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.