Apache HTTP最新官方配置(中译版)

简介:
Apache最新官方配置文件中文版。帮忙web服务器管理员更方便的对Apache进行配置。

#

# Based upon the NCSA server configuration files originally by Rob McCool.

#参照NCSA服务器的配置文件,原版由Rob McCool发布

#

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

# configuration directives that give the server its instructions.

# See <URL: http://httpd.apache.org/docs-2.0/&amp;gt; for detailed information about

# the directives.

#这是Apache server的主配置文件. 它包含配置指令,来指示服务器

#请参考 http://httpd.apache.org/docs-2.0 了解关于指令的详细信息

# 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').

# 1. 控制Apache server的全局操作的指令(全局环境变量).

# 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.配置主服务或者默认服务的指令,它针对那些被虚拟主机以外的请求作出响应.

#  它也包含虚拟主机的一些默认参数

# 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.

# 3. 虚拟主机设置,这使得发往不同的ip或者主机名的请求可以被子同一个Apache服务#   器处理

# 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 "C:/Program Files/Apache Group/Apache2" will be interpreted by the

# server as "C:/Program Files/Apache Group/Apache2/logs/foo.log".

#配置和日志文件名:如果你所指定的文件名以”/”(在Win32中以盘符:/)开头,服务器将以绝对路径来处理。如果不以”/”开头,则以相对于 ServerRoot不解释,所以对于logs/foo.log来讲,当ServerRoot为"C:/Program Files/ApacheGroup/Apache2”时,则指的是

C:/Program Files/Apache Group/Apache2/logs/foo.log文件

# NOTE: Where filenames are specified, you must use forward slashes

# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").

注意,在文件名的定义中,必须用正斜杠,而不是反斜杠,如c:/apache而不是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.

#如果省略了盘符,则以Apache.exe所在的盘符为默认值

建议在绝对路径中永远使用显式的盘符,这样有助于消除误解

### 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.

#本部分的指令将影响整个Apache服务器,例如它所能处理的并发请求数或者它在哪里能够找到其配置文件

#

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

# configuration, error, and log files are kept.

# ServerRoot: 服务器的配置,错误和日志文件的根目录

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

# mounted filesystem then please read the LockFile documentation (available

# at <URL: http://httpd.apache.org/docs-2.0 ... tml#lockfile&gt;);

# you will save yourself a lot of trouble.

#注意:如果将其保存到NFS上或者网络上mounted的文件系统上,然后应该阅读LockFile文档, http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile,将能解决你的很多麻烦.

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

#不要在目录的末尾加上斜杠

ServerRoot "C:/Program Files/Apache Group/Apache2"

ServerRoot:根目录

#

# ScoreBoardFile: File used to store internal server process information.

# If unspecified (the default), the scoreboard will be stored in an

# anonymous shared memory segment, and will be unavailable to third-party

# applications.

ScoreBoardFile: 保存服务器内部的处理信息

如果未定议(默认状态),scoreboard将被保存在匿名的共享内存段中,并且对于第三方来讲,是不可获得的

# If specified, ensure that no two invocations of Apache share the same

# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.

#如果已定义,应确保Apache的两个调用不能共享同一个scoreboard. Scoreboard文件必须存放在可分配的磁盘上

#ScoreBoardFile logs/apache_runtime_status

#

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

# identification number when it starts.

#PidFile:当服务器起努时,服务器需要将其进程ID号存放在此文件中

PidFile logs/httpd.pid

#

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

#Timeout:接收和发送数据的超时设置,秒数

Timeout 300

#

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

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

#KeepAlive: 是否支持持久联接(而不是每个请求建一个连接),设off关闭此功能

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:在持久连接期间,所允许的最大请求数量。设为0表示不作限制

建议设为较高的数,以提高性能

MaxKeepAliveRequests 100

#

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

# same client on the same connection.

#KeepAliveTimeout:在同一个客户连接中,等待下一个请求的等待时间。

KeepAliveTimeout 15

##

## Server-Pool Size Regulation (MPM specific)

## 常规Server-Pool服务器池的大小(每分钟M数)

# WinNT MPM WinNT 的MPM

# ThreadsPerChild: constant number of worker threads in the server process

ThreadPerChild:服务器进程中工作的线程数量

# MaxRequestsPerChild: maximum number of requests a server process serves

每个服务进程的最大请求数

<IfModule mpm_winnt.c>

ThreadsPerChild 250

MaxRequestsPerChild 0

</IfModule>

#

# Listen: Allows you to bind Apache to specific IP addresses and/or

# ports, instead of the default. See also the <VirtualHost>

# directive.

#Listen:允许你将Apache绑定到指定的IP地址或端口,而不是默认端口,请同时参考<VirtualHost>指令

# Change this to Listen on specific IP addresses as shown below to

# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)

#像下面那样指定侦听的IP地址,防止Apache抢占所有绑定的IP地址

#Listen 12.34.56.78:80

Listen 80

#

# Dynamic Shared Object (DSO) Support

#动态共享对象支持DSO
 
 
 
本文转自温景良(Jason)博客园博客,原文链接: http://www.cnblogs.com/wenjl520/archive/2009/06/05/1496624.html,如需转载请自行联系原作者
相关文章
|
10月前
|
人工智能 Ubuntu 前端开发
Dify部署全栈指南:AI从Ubuntu配置到HTTPS自动化的10倍秘籍
本文档介绍如何部署Dify后端服务及前端界面,涵盖系统环境要求、依赖安装、代码拉取、环境变量配置、服务启动、数据库管理及常见问题解决方案,适用于开发与生产环境部署。
1837 1
|
应用服务中间件 Linux 网络安全
Centos 8.0中Nginx配置文件和https正书添加配置
这是一份Nginx配置文件,包含HTTP与HTTPS服务设置。主要功能如下:1) 将HTTP(80端口)请求重定向至HTTPS(443端口),增强安全性;2) 配置SSL证书,支持TLSv1.1至TLSv1.3协议;3) 使用uWSGI与后端应用通信(如Django);4) 静态文件托管路径设为`/root/code/static/`;5) 定制错误页面(404、50x)。适用于Web应用部署场景。
1103 87
|
9月前
|
网络安全 开发工具 git
在GitLab CI中同步HTTPS仓库地址的yaml配置
最后,提交并推送 `.gitlab-ci.yml`文件到您的GitLab仓库。GitLab CI/CD将自动识别这个文件,并在每次推送到 `master`分支时执行定义的同步任务。
464 16
|
缓存 监控 负载均衡
HTTP代理配置中的常见错误及其解决方案
随着互联网发展,使用HTTP动态代理IP的需求日益增加。配置HTTP代理时常见问题及解决方法包括:1) 代理服务器无法连接:检查网络、防火墙和代理服务状态;2) 认证失败:确认凭据和配置;3) 请求超时:增加超时时间、检查后端服务和网络延迟;4) 缓存问题:清理缓存、设置缓存控制或禁用缓存;5) SSL/TLS问题:正确配置证书并确保客户端信任;6) 访问控制问题:检查ACL和日志;7) 性能问题:监控资源、负载均衡和优化配置;8) 日志记录与分析问题:启用详细日志、设置轮换策略和使用分析工具。通过解决这些问题,可以更有效地管理HTTP代理。
2035 13
|
缓存 应用服务中间件 网络安全
Nginx中配置HTTP2协议的方法
Nginx中配置HTTP2协议的方法
1471 7
|
Linux iOS开发 MacOS
【MCP教程系列】阿里云百炼MCP全面配置指南:涵盖NPX、UVX、SSE及Streamable HTTP
本文详细介绍如何在阿里云百炼平台及Windows、Linux、MacOS系统中正确配置MCP服务的JSON文件。内容涵盖三种MCP服务配置:npx(基于Stdio)、uvx(Python工具运行)和SSE(服务器发送事件)。同时解析Streamable HTTP作为新一代传输方案的优势与应用,帮助用户掌握每个参数的具体用途及使用方法,解决配置过程中可能遇到的问题,提供完整示例和扩展信息以优化设置体验。
7521 11
|
Dubbo 安全 应用服务中间件
Apache Dubbo 正式发布 HTTP/3 版本 RPC 协议,弱网效率提升 6 倍
在 Apache Dubbo 3.3.0 版本之后,官方推出了全新升级的 Triple X 协议,全面支持 HTTP/1、HTTP/2 和 HTTP/3 协议。本文将围绕 Triple 协议对 HTTP/3 的支持进行详细阐述,包括其设计目标、实际应用案例、性能测试结果以及源码架构分析等内容。
1325 129
|
存储 分布式计算 druid
大数据-152 Apache Druid 集群模式 配置启动【下篇】 超详细!(一)
大数据-152 Apache Druid 集群模式 配置启动【下篇】 超详细!(一)
402 1
大数据-152 Apache Druid 集群模式 配置启动【下篇】 超详细!(一)
|
安全 应用服务中间件 网络安全
49.3k star,本地 SSL 证书生成神器,轻松解决 HTTPS 配置痛点
mkcert是一款由Filippo Valsorda开发的免费开源工具,专为生成受信任的本地SSL/TLS证书而设计。它通过简单的命令自动生成并安装本地信任的证书,使本地环境中的HTTPS配置变得轻松无比。mkcert支持多个操作系统,已获得49.2K的GitHub Star,成为开发者首选的本地SSL工具。
1295 10
|
缓存 前端开发 应用服务中间件
CORS跨域+Nginx配置、Apache配置
CORS跨域+Nginx配置、Apache配置
970 7

热门文章

最新文章

推荐镜像

更多