ApacheHTTP latest official configuration (Chinese Version)

Source: Internet
Author: User
Article Title: ApacheHTTP's latest official configuration (Chinese version ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Abstr: The Chinese version of Apache's latest official configuration file. The web server administrator can easily configure Apache.
  
#
  
# Based upon the NCSA server configuration files originally by Rob McCool.
  
# Refer to the configuration file of the NCSA server. The original version is released by Rob McCool.
  
#
  
# This is the main Apache server configuration file. It contains
  
# Configuration directives that give the server its instructions.
  
# See For detailed information about
  
# The directives.
  
# This is the main configuration file of Apache server. It contains configuration instructions to instruct the server
  
# Refer to the http://httpd.apache.org/docs-2.0 for instructions
  
# 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.
  
# Not just reading this instruction, but understanding what the instruction has done. Here only serves as a prompt.
  
# If you are not clear, refer to the online documentation. Note
  
# The configuration directives are grouped into three basic sections:
  
# Configuration file batch order is divided into three basic groups
  
#1. Directives that control the operation of the Apache server process as
  
# Whole (the 'Global environment ').
  
#1. commands for controlling global operations of Apache server (global environment variables ).
  
#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.
  
#2. Configure the commands of the master service or default service. It responds to requests other than the virtual host.
  
# It also contains some default VM Parameters
  
#3. Settings for virtual hosts, which allow Web requests to be sent
  
# Different IP addresses or hostnames and have them handled by
  
# Same Apache server process.
  
#3. VM settings, so that requests sent to different ip addresses or host names can be processed by the same Apache service #
  
# Configuration and logfile names: If the filenames you specify for Example
  
# Of the server's control files begin with "/" (or "drive:/" for Win32),
  
# 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 "C:/Program Files/Apache Group/Apache2" will be interpreted by
  
# Server as "C:/Program Files/Apache Group/Apache2/logs/foo. log ".
  
# Configuration and Log File Name: if the specified file name starts with "/" (in Win32, it starts with a drive letter:/), the server will process it in an absolute path. If it does not start with "/", it is not interpreted as relative to ServerRoot. Therefore, for logs/foo. for log, when ServerRoot is "C:/Program Files/Apache Group/Apache2 ",
  
C:/Program Files/Apache Group/Apache2/logs/foo. log File
  
# NOTE: Where filenames are specified, you must use forward slashes
  
# Instead of backslashes (e.g., "c:/apache" instead of "c: \ apache ").
  
Note: In the file name definition, a forward slash must be used instead of a backslash, such as c:/apache rather than c: \ apache.
  
# If a drive letter is omitted, the drive on which Apache.exe is located
  
# Will be used by default. It is recommended that you always supply
  
# An explicit drive letter in absolute paths, however, to avoid
  
# Confusion.
  
If the disc is omitted, the default value is the drive letter of apache.exe.
  
We recommend that you always use an explicit drive letter in the absolute path to eliminate misunderstandings.
  
### Section 1: Global Environment
  
# Part 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.
  
# The commands in this section will affect the entire Apache server, for example, the number of concurrent requests it can process or where it can find its configuration file
  
#
  
# ServerRoot: The top of the directory tree under which the server's
  
# Configuration, error, and log files are kept.
  
# ServerRoot: server configuration, root directory of errors and log files
  
# NOTE! If you intend to place this on an NFS (or otherwise network)
  
# Mounted filesystem then please read the LockFile documentation (available
  
# );
  
# You will save yourself a lot of trouble.
  
# Note: If you save it to NFS or the mounted file system on the network, read the LockFile document at http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile, which will solve your problems.
  
# Do NOT add a slash at the end of the directory path.
  
# Do not add a slash at the end of the Directory
  
ServerRoot "C:/Program Files/Apache Group/Apache2"
  
ServerRoot: root directory
  
#
  
# ScoreBoardFile: File used to store internal server process information.
  
# If unspecified (the default), the scoreboard will be stored in
  
# Anonymous shared memory segment, and will be unavailable to third-party
  
# Applications.
  
ScoreBoardFile: saves the processing information inside the server.
  
If not determined (default status), scoreboard will be stored in an anonymous shared memory segment and is not available to third parties.
  
# If specified, ensure that no two invocations of Apache share the same
  
# Scoreboard file. The scoreboard file must be stored on a local disk.
  
# If it has been defined, make sure that the two Apache calls cannot share the same scoreboard. Scoreboard file on the allocable disk.
  
# ScoreBoardFile logs/apache_runtime_status
  
#
  
# PidFile: The file in which the server shoshould record its process
  
# Identification number when it starts.
  
# PidFile: when the server starts, the server needs to store the process ID in this file
  
PidFile logs/httpd. pid
  
#
  
# Timeout: The number of seconds before between ES and sends time out.
  
# Timeout: time-out setting for receiving and sending data, in seconds
  
Timeout 300
  
#
  
# KeepAlive: Whether or not to allow persistent connections (more
  
# One request per connection). Set to "Off" to deactivate.
  
# KeepAlive: Whether persistent connections are supported (instead of creating a connection for each request). set off to disable this function.
  
KeepAlive On
  
#
  
# 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: Maximum number of requests allowed during a persistent connection. If it is set to 0, no restrictions are imposed.
  
It is recommended to set a high number to improve performance.
  
MaxKeepAliveRequests 100
  
#
  
# KeepAliveTimeout: Number of seconds to wait for the next request from
  
# Same client on the same connection.
  
# KeepAliveTimeout: the waiting time for the next request in the same client connection.
  
KeepAliveTimeout 15
  
##
  
# Server-Pool Size Regulation (MPM specific)
  
# General Server-Pool Server Pool size (mb per minute)
  
# MPM of WinNT MPM
  
# ThreadsPerChild: constant number of worker threads in the server process
  
ThreadPerChild: Number of threads working in the server process
  
# MaxRequestsPerChild: maximum number of requests a server process serves
  
Maximum number of requests for each service process
  
  
  
ThreadsPerChild 250
  
MaxRequestsPerChild

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.