How does Apache control traffic and IP concurrency in windows?

Source: Internet
Author: User

In Windows, Apache requires the mod_limitipconn.dll module to limit the number of IP connections. apache2.2 is used as an example.

1. Download the corresponding module mod_limitipconn.dll.
2. Place it under apache2.2 \ modules
3. Modify httpd. conf configuration
Loadmodule status_module modules/mod_status.so remove the previous #
Add

Extendedstatus on

Loadmodule limitipconn_module modules \ mod_limitipconn.dll

<Ifmodule mod_limitipconn.c>

<Location/>

Maxconnperip 3

Noiplimit image /*

</Location>

</Ifmodule>

Note:

<Location/> # the directory to be restricted. The root directory is shown here.
Maxconnperip 3 # limit the number of concurrent connections of each IP address, which is 3
Noiplimit image/* # No IP address limit on image folders

Restart Apache

Traffic control:

Find a module of the bandwidth module in the http://modules.apache.org website
Installation:

1. Place mod_b1_dll in modules under the Apache installation folder.
2. Edit httpd. conf and add loadmodule bw_module modules/mod_bw.dll
3. Restart Apache
4. Check whether mod_bw exists in phpinfo ().
The following is an example of settings:

Each connection line is limited to 100 kb/s, and the minimum speed is 50kb/S. When the file exceeds 500 kb, the speed is limited to 50kb/s.

Bandwidthmodule on
Forcebandwidthmodule on
Bandwidth all 1024000
Minbandwidth all 50000
Largefilelimit * 500 50000
Servername www.example.com

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.