ApacheHTTP最新官方配置(中译版)
点击次数:21 次 发布日期:2008-11-22 09:41:38 作者:源代码网
|
源代码网推荐文章简介:Apache最新官方配置文件中文版。帮忙web服务器管理员更方便的对Apache进行配置。 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#BasedupontheNCSAserverconfigurationfilesoriginallybyRobMcCool. 源代码网推荐 源代码网推荐#参照NCSA服务器的配置文件,原版由RobMcCool发布 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#ThisisthemainApacheserverconfigurationfile. Itcontainsthe 源代码网推荐 源代码网推荐#configurationdirectivesthatgivetheserveritsinstructions. 源代码网推荐 源代码网推荐#See<URL:http://httpd.apache.org/docs-2.0/>fordetailedinformationabout 源代码网推荐 源代码网推荐#thedirectives. 源代码网推荐 源代码网推荐#这是Apacheserver的主配置文件.它包含配置指令,来指示服务器 源代码网推荐 源代码网推荐#请参考http://httpd.apache.org/docs-2.0了解关于指令的详细信息 源代码网推荐 源代码网推荐#DoNOTsimplyreadtheinstructionsinherewithoutunderstanding 源代码网推荐 源代码网推荐#whattheydo. They"rehereonlyashintsorreminders. Ifyouareunsure 源代码网推荐 源代码网推荐#consulttheonlinedocs.Youhavebeenwarned. 源代码网推荐 源代码网推荐#不要仅仅是阅读本指令,而应该理解指令做了什么。在这里仅起提示的作用。 源代码网推荐 源代码网推荐#如果你不清楚请参阅在线文档。特别提示 源代码网推荐 源代码网推荐#Theconfigurationdirectivesaregroupedintothreebasicsections: 源代码网推荐 源代码网推荐#配置文件批令分为三个基本组 源代码网推荐 源代码网推荐# 1.DirectivesthatcontroltheoperationoftheApacheserverprocessasa 源代码网推荐 源代码网推荐#whole(the"globalenvironment"). 源代码网推荐 源代码网推荐# 1.控制Apacheserver的全局操作的指令(全局环境变量). 源代码网推荐 源代码网推荐# 2.Directivesthatdefinetheparametersofthe"main"or"default"server, 源代码网推荐 源代码网推荐#whichrespondstorequeststhataren"thandledbyavirtualhost. 源代码网推荐 源代码网推荐#Thesedirectivesalsoprovidedefaultvaluesforthesettings 源代码网推荐 源代码网推荐#ofallvirtualhosts. 源代码网推荐 源代码网推荐# 2.配置主服务或者默认服务的指令,它针对那些被虚拟主机以外的请求作出响应. 源代码网推荐 源代码网推荐#它也包含虚拟主机的一些默认参数 源代码网推荐 源代码网推荐# 3.Settingsforvirtualhosts,whichallowWebrequeststobesentto 源代码网推荐 源代码网推荐#differentIPaddressesorhostnamesandhavethemhandledbythe 源代码网推荐 源代码网推荐#sameApacheserverprocess. 源代码网推荐 源代码网推荐# 3.虚拟主机设置,这使得发往不同的ip或者主机名的请求可以被子同一个Apache服务#器处理 源代码网推荐 源代码网推荐#Configurationandlogfilenames:Ifthefilenamesyouspecifyformany 源代码网推荐 源代码网推荐#oftheserver"scontrolfilesbeginwith"/"(or"drive:/"forWin32),the 源代码网推荐 源代码网推荐#serverwillusethatexplicitpath. Ifthefilenamesdo*not*begin 源代码网推荐 源代码网推荐#with"/",thevalueofServerRootisprepended--so"logs/foo.log" 源代码网推荐 源代码网推荐#withServerRootsetto"C:/ProgramFiles/ApacheGroup/Apache2"willbeinterpretedbythe 源代码网推荐 源代码网推荐#serveras"C:/ProgramFiles/ApacheGroup/Apache2/logs/foo.log". 源代码网推荐 源代码网推荐#配置和日志文件名:如果你所指定的文件名以”/”(在Win32中以盘符:/)开头,服务器将以绝对路径来处理。如果不以”/”开头,则以相对于ServerRoot不解释,所以对于logs/foo.log来讲,当ServerRoot为"C:/ProgramFiles/ApacheGroup/Apache2”时,则指的是 源代码网推荐 源代码网推荐C:/ProgramFiles/ApacheGroup/Apache2/logs/foo.log文件 源代码网推荐 源代码网推荐#NOTE:Wherefilenamesarespecified,youmustuseforwardslashes 源代码网推荐 源代码网推荐#insteadofbackslashes(e.g.,"c:/apache"insteadof"c:apache"). 源代码网推荐 源代码网推荐注意,在文件名的定义中,必须用正斜杠,而不是反斜杠,如c:/apache而不是c:apache 源代码网推荐 源代码网推荐#Ifadriveletterisomitted,thedriveonwhichApache.exeislocated 源代码网推荐 源代码网推荐#willbeusedbydefault. Itisrecommendedthatyoualwayssupply 源代码网推荐 源代码网推荐#anexplicitdriveletterinabsolutepaths,however,toavoid 源代码网推荐 源代码网推荐#confusion. 源代码网推荐 源代码网推荐#如果省略了盘符,则以Apache.exe所在的盘符为默认值 源代码网推荐 源代码网推荐建议在绝对路径中永远使用显式的盘符,这样有助于消除误解 源代码网推荐 源代码网推荐###Section1:GlobalEnvironment 源代码网推荐 源代码网推荐#第一部分全局环境 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#ThedirectivesinthissectionaffecttheoveralloperationofApache, 源代码网推荐 源代码网推荐#suchasthenumberofconcurrentrequestsitcanhandleorwhereit 源代码网推荐 源代码网推荐#canfinditsconfigurationfiles. 源代码网推荐 源代码网推荐#本部分的指令将影响整个Apache服务器,例如它所能处理的并发请求数或者它在哪里能够找到其配置文件 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#ServerRoot:Thetopofthedirectorytreeunderwhichtheserver"s 源代码网推荐 源代码网推荐#configuration,error,andlogfilesarekept. 源代码网推荐 源代码网推荐#ServerRoot:服务器的配置,错误和日志文件的根目录 源代码网推荐 源代码网推荐#NOTE! IfyouintendtoplacethisonanNFS(orotherwisenetwork) 源代码网推荐 源代码网推荐#mountedfilesystemthenpleasereadtheLockFiledocumentation(available 源代码网推荐 源代码网推荐#at<URL:http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>); 源代码网推荐 源代码网推荐#youwillsaveyourselfalotoftrouble. 源代码网推荐 源代码网推荐#注意:如果将其保存到NFS上或者网络上mounted的文件系统上,然后应该阅读LockFile文档,http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile,将能解决你的很多麻烦. 源代码网推荐 源代码网推荐#DoNOTaddaslashattheendofthedirectorypath. 源代码网推荐 源代码网推荐#不要在目录的末尾加上斜杠 源代码网推荐 源代码网推荐ServerRoot"C:/ProgramFiles/ApacheGroup/Apache2" 源代码网推荐 源代码网推荐ServerRoot:根目录 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#ScoreBoardFile:Fileusedtostoreinternalserverprocessinformation. 源代码网推荐 源代码网推荐#Ifunspecified(thedefault),thescoreboardwillbestoredinan 源代码网推荐 源代码网推荐#anonymoussharedmemorysegment,andwillbeunavailabletothird-party 源代码网推荐 源代码网推荐#applications. 源代码网推荐 源代码网推荐ScoreBoardFile:保存服务器内部的处理信息 源代码网推荐 源代码网推荐如果未定议(默认状态),scoreboard将被保存在匿名的共享内存段中,并且对于第三方来讲,是不可获得的 源代码网推荐 源代码网推荐#Ifspecified,ensurethatnotwoinvocationsofApachesharethesame 源代码网推荐 源代码网推荐#scoreboardfile.ThescoreboardfileMUSTBESTOREDONALOCALDISK. 源代码网推荐 源代码网推荐#如果已定义,应确保Apache的两个调用不能共享同一个scoreboard.Scoreboard文件必须存放在可分配的磁盘上 源代码网推荐 源代码网推荐#ScoreBoardFilelogs/apache_runtime_status 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#PidFile:Thefileinwhichtheservershouldrecorditsprocess 源代码网推荐 源代码网推荐#identificationnumberwhenitstarts. 源代码网推荐 源代码网推荐#PidFile:当服务器起努时,服务器需要将其进程ID号存放在此文件中 源代码网推荐 源代码网推荐PidFilelogs/httpd.pid 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#Timeout:Thenumberofsecondsbeforereceivesandsendstimeout. 源代码网推荐 源代码网推荐#Timeout:接收和发送数据的超时设置,秒数 源代码网推荐 源代码网推荐Timeout300 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#KeepAlive:Whetherornottoallowpersistentconnections(morethan 源代码网推荐 源代码网推荐#onerequestperconnection).Setto"Off"todeactivate. 源代码网推荐 源代码网推荐#KeepAlive:是否支持持久联接(而不是每个请求建一个连接),设off关闭此功能 源代码网推荐 源代码网推荐KeepAliveOn 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#MaxKeepAliveRequests:Themaximumnumberofrequeststoallow 源代码网推荐 源代码网推荐#duringapersistentconnection.Setto0toallowanunlimitedamount. 源代码网推荐 源代码网推荐#Werecommendyouleavethisnumberhigh,formaximumperformance. 源代码网推荐 源代码网推荐#MaxKeepAliveRequests:在持久连接期间,所允许的最大请求数量。设为0表示不作限制 源代码网推荐 源代码网推荐建议设为较高的数,以提高性能 源代码网推荐 源代码网推荐MaxKeepAliveRequests100 源代码网推荐 源代码网推荐# 源代码网推荐 源代码网推荐#KeepAliveTimeout:Numberofsecondstowaitforthenextrequestfromthe 源代码网推荐 源代码网推荐#sameclientonthesameconnection. 源代码网推荐 源代码网推荐#KeepAliveTimeout:在同一个客户连接中,等待下一个请求的等待时间。 源代码网推荐 源代码网推荐KeepAliveTimeout15 源代码网推荐 源代码网推荐## 源代码网推荐 源代码网推荐##Server-PoolSizeRegulation(MPMspecific) 源代码网推荐 源代码网推荐##常规Server-Pool服务器池的大小(每分钟M数) 源代码网推荐 源代码网推荐#WinNTMPMWinNT的MPM 源代码网推荐 源代码网推荐#ThreadsPerChild:constantnumberofworkerthreadsintheserverprocess 源代码网推荐 源代码网推荐ThreadPerChild:服务器进程中工作的线程数量 源代码网推荐 源代码网推荐#MaxRequestsPerChild:maximum numberofrequestsaserverprocessserves 源代码网推荐 源代码网推荐每个服务进程的最大请求数 源代码网推荐 源代码网推荐<IfModulempm_winnt.c> 源代码网推荐 源代码网推荐ThreadsPerChild250 源代码网推荐 源代码网推荐MaxRequestsPerChild源代码网供稿. |
