Current location - Quotes Website - Team slogan - How to configure the listening port of Apache server
How to configure the listening port of Apache server
This paper briefly introduces a dozen Apache configuration skills: 1, and how to set the request waiting time.

Set in httpd.conf:

Timeout n

Where n is an integer in seconds.

Setting this timeout applies to three situations:

2. How to receive the total time of get request

Time between receiving TCP packets requested by post and put.

Response (ack) time interval in TCP packet transmission

3. How do I get apache to listen on a specific port?

Modify the options about Listen in httpd.conf, for example:

Listen, 8000

Is to have apache listen on port 8000.

If you want to specify a listening port and listening address, you can use:

Listen to192.170.2.1:80

Listen to 192. 170.2.5:8000

This makes apache listen to port 80 of192.170.2.1and port 8000 of 192. 170.2.5 at the same time.

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

Port 80

So as to achieve a similar effect.

4. How to set the maximum number of idle processes in apache?

Modify httpd.conf and set it in:

MaxSpareServers n

Where n is an integer. In this way, when there are more than n idle processes, the apache main process will kill the redundant idle processes and keep the number of idle processes at n, thus saving system resources. It is necessary to adjust this parameter in a very busy apache site, but it is not a good idea to adjust this parameter greatly at any time.