Apache Configuration Tips

Source: Internet
Author: User
1. How to set Request Wait time

Inside the httpd.conf set:

TimeOut N

where n is an integer and the unit is seconds.

Setting this timeout applies to three different scenarios:

2. How to receive the total time of a GET request

The time between the TCP packets that receive a post and put request

Response (ACK) time interval in TCP packet transport

3. How to make Apache monitor on a specific port

Modify the httpd.conf inside the listen options, such as:

Listen 8000

is to make Apache listen on port 8000.

And if you want to specify both a listening port and a listening address, you can use:

Listen 192.170.2.1:80
Listen 192.170.2.5:8000

This allows Apache to simultaneously listen on the 192.170.2.1 80 port and the 192.170.2.5 8000 port.

Of course, you can also set in httpd.conf:

Port 80

This will achieve a similar effect.

4, how to set the maximum number of idle processes Apache

Modify the httpd.conf, set in the inside:

Maxspareservers N

where n is an integer. So when the idle process exceeds n, the Apache main process kills the extra idle process while keeping the idle process in N, saving the system resources. If it is necessary to adjust this parameter at a very busy site in Apache, it is not a good idea to tune this parameter to a large majority at any time.

You can also set:

Minspareservers N

To limit the minimum number of idle processes to speed up the response.

5. How does Apache set the number of child service processes at startup

Inside the httpd.conf set:

Startservers 5

This will allow 5 free child processes to wait for the request to be accepted after you start Apache.

You can also refer to Minspareservers and maxspareservers settings.

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.