Configure apache for Debian VPS to limit the number of connections from the same IP address

Source: Internet
Author: User
Tags vps

By default, Apache does not limit the number of connections from the same IP address. In practice, the number of connections from the same IP address is usually large, which affects the server performance. To avoid this situation, you can configure such a module for apache. This article describes how to implement this process in Debian VPS. This module is not official from apache, but from a third party. Its homepage is http://dominia.org/djao/limitipconn2.html. First download the source code here. Install the compilation tool in Debian VPS:

apt-get install make gcc apache2-prefork-dev
Undo the source code package, modify Makefile, change apxs to apxs2, and then run:
makemake install
Add in http. conf
ExtendedStatus On <IfModule mod_limitipconn.c> <Location/> # MaxConnPerIP 3 in the/directory of all virtual hosts # Only three concurrent connections are allowed per IP address </Location> </IfModule>
Restart apache and use thunder to download something on your website. By default, we will find five threads opened by thunder, which can successfully establish connections with your web site, the number of concurrent connections you set will not exceed

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.