Redhat Enterprise Linux 5下apache部署及简单的配置过程(2)

# This is the main Apache server configuration file. It contains the

这是Apache服务器的主要配置文件

# configuration directives that give the server its instructions.

# See <URL:[url]>[/url] for detailed information.

# In particular, see

# <URL:[url]>[/url]

# for a discussion of each configuration directive.

#

#

# Do NOT simply read the instructions in here without understanding

# what they do. They're here only as hints or reminders. If you are unsure

# consult the online docs. You have been warned.

#

# The configuration directives are grouped into three basic sections:

# 1. Directives that control the operation of the Apache server process as a

# whole (the 'global environment').

# 2. Directives that define the parameters of the 'main' or 'default' server,

# which responds to requests that aren't handled by a virtual host.

# These directives also provide default values for the settings

# of all virtual hosts.

# 3. Settings for virtual hosts, which allow Web requests to be sent to

# different IP addresses or hostnames and have them handled by the

# same Apache server process.

#

配置和日志文件的名称

# Configuration and logfile names: If the filenames you specify for many

# of the server's control files begin with "/" (or "drive:/" for Win32), the

# server will use that explicit path. If the filenames do *not* begin

# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"

# with ServerRoot set to "/etc/httpd" will be interpreted by the

# server as "/etc/httpd/logs/foo.log".

#

### Section 1: Global Environment

#

# The directives in this section affect the overall operation of Apache,

# such as the number of concurrent requests it can handle or where it

# can find its configuration files.

#

#

# Don't give away too much information about all the subcomponents

# we are running. Comment out this line if you don't mind remote sites

# finding out what major optional modules you are running

ServerTokens OS

当服务器响应主机头(header)信息时显示Apache 的版本和操作系统名称

#

# ServerRoot: The top of the directory tree under which the server's

# configuration, error, and log files are kept.

#

# NOTE! If you intend to place this on an NFS (or otherwise network)

# mounted filesystem then please read the LockFile documentation

# (available at <URL:[url]#lockfile>[/url]);

# you will save yourself a lot of trouble.

#

# Do NOT add a slash at the end of the directory path.

#

ServerRoot "/etc/httpd"

服务器根目录

#

# PidFile: The file in which the server should record its process

# identification number when it starts.

#

PidFile run/httpd.pid

设置运行Apache 时使用的PidFile 的路径

#

# Timeout: The number of seconds before receives and sends time out.

#

Timeout 120

超时时间

#

# KeepAlive: Whether or not to allow persistent connections (more than

# one request per connection). Set to "Off" to deactivate.

#

KeepAlive Off

使用保持连接的功能 关闭 (建议打开)

#

# MaxKeepAliveRequests: The maximum number of requests to allow

# during a persistent connection. Set to 0 to allow an unlimited amount.

# We recommend you leave this number high, for maximum performance.

#

MaxKeepAliveRequests 100

在使用保持连接功能时,设置客户一次请求连接能响应文件的最大上限

#

# KeepAliveTimeout: Number of seconds to wait for the next request from the

# same client on the same connection.

#

KeepAliveTimeout 15

在使用保持连接功能时,两个相邻的连接的时间间隔超过15 秒,就切断连接

##

## Server-Pool Size Regulation (MPM specific)

##

设置使用prefork MPM 运行方式的参数

# prefork MPM

# StartServers: number of server processes to start

# MinSpareServers: minimum number of server processes which are kept spare

# MaxSpareServers: maximum number of server processes which are kept spare

# ServerLimit: maximum value for MaxClients for the lifetime of the server

# MaxClients: maximum number of server processes allowed to start

# MaxRequestsPerChild: maximum number of requests a server process serves

<IfModule prefork.c>

StartServers 8

一开始就有八个进程

linux

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyjygw.html