Translated Apache2 configuration file--httpd.conf

Source: Internet
Author: User
#
# A configuration file based on the NCSA service.
#
#这是Apache服务器主要配置文件.
#它包含服务器的影响服务器运行的配置指令.
#参见以取得关于这些指令的详细信息
#
#不要只是简单的阅读这些指令信息而不去理解它.
#这里只是做了简单的说明, if you don't have a reference online file, you'll be warned.
#

#这些配置指令被分为下面三个部分:
#1. Part of controlling the entire Apache server behavior (that is, Global environment variables)
#2. A directive that defines primary or default service parameters, and also provides default setting parameters for all virtual hosts
#3. Setup parameters for the virtual host
#
#配置和日志文件名: If you specify a filename to start with "/" (Win32 "dirver:/"),
#服务器将使用绝对路径, if the filename does not start with "/", then it will put the ServerRoot
#的值附加在文件名的前面, for example, for "Logs/foo.log", if the value of ServerRoot
#为 "/usr/local/apache2", the file should be "/usr/local/apache2/logs/foo.log"
#
# #第一区: Global Environment parameters
#
#这里设置的参数将影响整个Apache服务器的行为;
#例如Apache能够处理的并发请求的数量等.
#
#ServerRoot: Indicates the root directory where the server saves its configuration, errors, log files, and so on.
#
#注意. If you want to designate it as an NFS or a location on another network,
#请一定要去阅读与LockFile有关的文档 (possibly in
#)。
#这将会使你自己也能解决很多问题.
#
#路径的结尾不要添加斜线.
#
ServerRoot "/usr/loacl/apache2"

#
#串行访问的锁文件必须保存在本地磁盘上
#


#LockFile Logs/accept.lock


#ScoreBoardFile: A file that is used to hold information about internal service processes.
#如果未指明 (default), the scoreboard (scoreboard) is saved in an anonymous shared memory segment.
#并且它不能被第三方软件所使用.
#如果指定了, make sure you can't use the same scoreboard file with two Apache.
#这个记分板文件必须保存在本地磁盘上.
#


#ScoreBoardFile Logs/apache_runtime_status


#
#PidFile: The file that records the server startup process number.
#

Pidfile Logs/httpd.pid


#
#Timeout: Timeout seconds before receiving and sending
#
Timeout 300

#
#KeepAlive: Whether a solid connection is allowed (multiple requests per connection),
#设为 "Off" is deactivated.
#
KeepAlive on

#
#MaxKeepAliveRequests: The maximum number of requests allowed during a solid connection,
#设为0表示无限制接入.
#我们推荐你将其设为一个较大的值 in order to improve performance
Maxkeepaliverequests 100

#
#KeepAliveTimeout: The number of seconds to receive requests from the same client on the same connection
#
KeepAliveTimeout 15

##
# #Server-pool Size setting (for MPM)
##

# prefork MPM
# startservers: Number of processes started by the server at startup
# minspareservers: The minimum number of standby processes maintained
# Maxspareservers: The maximum number of standby processes maintained
# MaxClients: Maximum number of processes that the server allows to start
# Maxrequestsperchild: Maximum number of requests allowed by a service process

Startservers 5
Minspareservers 5
Maxspareservers 10
MaxClients 150
Maxrequestperchild 0


# worker MPM
# startservers: Number of service processes at server startup
# MaxClients: Maximum number of users allowed to connect simultaneously
# Minsparethreads: Minimum number of worker threads guaranteed
# Maxsparethreads: Maximum number of worker threads allowed
# Threadsperchild: Worker thread constants in each service process
# Maxrequestsperchild: Maximum number of requests allowed in the service process

Startservers 2
MaxClients 150
Minsparethreads 25
Maxsparethreads 75
Threadsperchild 25
Maxrequestsperchild 0


# Perchild MPM
# numservers: Number of service processes
# startthreads: Number of start threads in each service process
# Minsparethreads: Minimum number of threads guaranteed
# Maxsparethreads: Maximum number of threads maintained
# Maxthreadsperchild: Maximum number of threads allowed per service process
# Maxrequestsperchild: Maximum number of connections allowed per service process

Numservers 5
Startthreads 5
Minsparethreads 5
Maxsparethreads 10
Maxthreadsperchild 20
Maxrequestsperchild 0


# WinNT MPM
# Threadsperchild: Worker thread constants in service process
# Maxrequestsperchild: Maximum number of requests allowed by the service process

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.