分享
 
 
 

Apache HTTP最新官方配置(中译版[4]) [5~待续]

王朝system·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

# Deny from all

# </LimitExcept>

#</Directory>

#

# DirectoryIndex: sets the file that Apache will serve if a directory

# is requested.

#DirectoryIndex: Apache服务器将要以一个目录的形式响应服务

# The index.html.var file (a type-map) is used to deliver content-

# negotiated documents. The MultiViews Option can be used for the

# same purpose, but it is much slower.

#index.html变量文件(一种映射)将直接传送内容。MultiViews选项可以用于同样的目的,但是要慢得多

DirectoryIndex index.html index.html.var

#

# AccessFileName: The name of the file to look for in each directory

# for additional configuration directives. See also the AllowOverride

# directive.

#AccessFileName: 用来查找各个目录下额外的配置指令的配置文件名,同时参考AllowOverride(允许重载)指令

#Acce

AccessFileName .htaccess

#

# The following lines prevent .htaccess and .htpasswd files from being

# viewed by Web clients.

#下面两行,阻址Web客户端访问 .htaccess和htpasswd(访问设定和密码)的文件

#

<Files ~ "^\.ht">

Order allow,deny

Deny from all

</Files>

#

# TypesConfig describes where the mime.types file (or equivalent) is

# to be found.

# TypesConfig,描述在何处找到mime型别

TypesConfig conf/mime.types

#

# DefaultType is the default MIME type the server will use for a document

# if it cannot otherwise determine one, such as from filename extensions.

如果服务器不能确定文档的型别,将使用默认的MIME型别,例如根据扩展名

# If your server contains mostly text or HTML documents, "text/plain" is

# a good value. If most of your content is binary, such as applications

# or images, you may want to use "application/octet-stream" instead to

# keep browsers from trying to display binary files as though they are

# text.

#如果你的服务器主要包括text/html文档,”text/plain”就是一个好的取值。如果你的大多数内容是binary(二进制)的,如应用程序或图片,你可能希望使用application/octet-stream,使得浏览器试图显示二进制数据,尽管它们是文本

DefaultType text/plain

#

# The mod_mime_magic module allows the server to use various hints from the

# contents of the file itself to determine its type. The MIMEMagicFile

# directive tells the module where the hint definitions are located.

# mod_mime_magic模块,允许服务器根据内容提示来识别文件型别。MIMEMagicFile指令告知模块“内容提示”应到何处找。

<IfModule mod_mime_magic.c>

MIMEMagicFile conf/magic

</IfModule>

#

# HostnameLookups: Log the names of clients or just their IP addresses

# e.g., www.apache.org (on) or 204.62.129.132 (off).

# The default is off because it'd be overall better for the net if people

# had to knowingly turn this feature on, since enabling it means that

# each client request will result in AT LEAST one lookup request to the

# nameserver.

HostNameLookups: 客户日志或者仅其IP地址,如www.apache.org(on) 或者204.62.129.132

(off).默认为值设为off比较好,如果希望将此置为on将意味着第一次客户请求都至少要查询一次nameserver.

#

HostnameLookups Off

#

# EnableMMAP: Control whether memory-mapping is used to deliver

# files (assuming that the underlying OS supports it).

# The default is on; turn this off if you serve from NFS-mounted

# filesystems. On some systems, turning it off (regardless of

# filesystem) can improve performance; for details, please see

# http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap

# EnableMMAP: 控制是否通过内存映射的方式传送文件(须得操作系统支持)

默认值为on; 如果你使用NSF加载的文件系统(通常在linux下),应置为off. 在某些系统上,置off,不管使用什么文件系统,能够提高效率,详细情况,请参阅文档

#EnableMMAP off

#

# EnableSendfile: Control whether the sendfile kernel support is

# used to deliver files (assuming that the OS supports it).

# The default is on; turn this off if you serve from NFS-mounted

# filesystems. Please see

# http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile

# EnableSendfile: 控制内核传送文件是否支持(需要OS支持)。默认为on,如果使用NFS,则使用off

#EnableSendfile off

#

# ErrorLog: The location of the error log file.

# If you do not specify an ErrorLog directive within a <VirtualHost>

# container, error messages relating to that virtual host will be

# logged here. If you *do* define an error logfile for a <VirtualHost>

# container, that host's errors will be logged there and not here.

#ErrorLog: 出错日志文件

如果你想为虚拟主机定义Errorlog指令,则该虚拟主机的错误信息将被记录到这里

ErrorLog logs/error.log

#

# LogLevel: Control the number of messages logged to the error.log.

# Possible values include: debug, info, notice, warn, error, crit,

# alert, emerg.

# LogLever: 日志等级,(与log4j相似,译者注),决定哪些级别的出错信息将被记录,如debug,info,notice,warn,error, crit,alert,emerg等,在设定级别以上的信息就会被记录(译者注).

LogLevel warn

#

# The following directives define some format nicknames for use with

# a CustomLog directive (see below).

# 日志格式(与log4j相似)

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

LogFormat "%h %l %u %t \"%r\" %>s %b" common

LogFormat "%{Referer}i -> %U" referer

LogFormat "%{User-agent}i" agent

# You need to enable mod_logio.c to use %I and %O

#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有