0

0

ApacheReferenceManual5

php中文网

php中文网

发布时间:2016-06-13 10:28:27

|

860人浏览过

|

来源于php中文网

原创

Syntax: ... Context: server config, virtual host, .htaccess Status: core Compatibility: only available in Apache 1.3 and above. The directive provides for access control by filename, just as the directive does. However, it accepts a regular expression. For example: would match most common Internet graphics formats. See also: How Directory, Location and Files sections work for an explanation of how these different sections are combined when a request is received -------------------------------------------------------------------------------- Group directive Syntax: Group unix-group Default: Group #-1 Context: server config, virtual host Status: core The Group directive sets the group under which the server will answer requests. In order to use this directive, the stand-alone server must be run initially as root. Unix-group is one of: A group name Refers to the given group by name. # followed by a group number. Refers to a group by its number. It is recommended that you set up a new group specifically for running the server. Some admins use user nobody, but this is not always possible or desirable. Note: if you start the server as a non-root user, it will fail to change to the specified group, and will instead continue to run as the group of the original user. Special note: Use of this directive in requires a properly configured suEXEC wrapper. When used inside a in this manner, only the group that CGIs are run as is affected. Non-CGI requests are still processed as the group specified in the main Group directive. SECURITY: See User for a discussion of the security considerations. -------------------------------------------------------------------------------- HostNameLookups directive Syntax: HostNameLookups on | off | double Default: HostNameLookups off Context: server config, virtual host, directory Status: core Compatibility: double available only in Apache 1.3 and above. Compatibility: Default was on prior to Apache 1.3. This directive enables DNS lookups so that host names can be logged (and passed to CGIs/SSIs in REMOTE_HOST). The value double refers to doing double-reverse DNS. That is, after a reverse lookup is performed, a forward lookup is then performed on that result. At least one of the ip addresses in the forward lookup must match the original address. (In "tcpwrappers" terminology this is called PARANOID.) Regardless of the setting, when mod_access is used for controlling access by hostname, a double reverse lookup will be performed. This is necessary for security. Note that the result of this double-reverse isnt generally available unless you set HostnameLookups double. For example, if only HostnameLookups on and a request is made to an object that is protected by hostname restrictions, regardless of whether the double-reverse fails or not, CGIs will still be passed the single-reverse result in REMOTE_HOST. The default for this directive was previously on in versions of Apache prior to 1.3. It was changed to off in order to save the network traffic for those sites that dont truly need the reverse lookups done. It is also better for the end users because they dont have to suffer the extra latency that a lookup entails. Heavily loaded sites should leave this directive off, since DNS lookups can take considerable amounts of time. The utility logresolve, provided in the /support directory, can be used to look up host names from logged IP addresses offline. -------------------------------------------------------------------------------- IdentityCheck directive Syntax: IdentityCheck boolean Default: IdentityCheck off Context: server config, virtual host, directory Status: core This directive enables RFC1413-compliant logging of the remote user name for each connection, where the client machine runs identd or something similar. This information is logged in the access log. Boolean is either on or off. The information should not be trusted in any way except for rudimentary usage tracking. Note that this can cause serious latency problems accessing your server since every request requires one of these lookups to be performed. When firewalls are involved each lookup might possibly fail and add 30 seconds of latency to each hit. So in general this is not very useful on public servers accessible from the Internet. -------------------------------------------------------------------------------- directive Syntax: ... Default: None Context: all Status: Core Compatibility: is only available in 1.3.1 and later. The ... section is used to mark directives that are conditional. The directives within an IfDefine section are only processed if the test is true. If test is false, everything between the start and end markers is ignored. The test in the section directive can be one of two forms: parameter-name !parameter-name In the former case, the directives between the start and end markers are only processed if the parameter named parameter-name is defined. The second format reverses the test, and only processes the directives if parameter-name is not defined. The parameter-name argument is a define as given on the httpd command line via -Dparameter-, at the time the server was started. sections are nest-able, which can be used to implement simple multiple-parameter tests. Example: $ httpd -DReverseProxy ... # httpd.conf LoadModule rewrite_module libexec/mod_rewrite.so LoadModule proxy_module libexec/libproxy.so -------------------------------------------------------------------------------- directive Syntax: ... Default: None Context: all Status: Core Compatibility: IfModule is only available in 1.2 and later. The ... section is used to mark directives that are conditional. The directives within an IfModule section are only processed if the test is true. If test is false, everything between the start and end markers is ignored. The test in the section directive can be one of two forms: module name !module name In the former case, the directives between the start and end markers are only processed if the module named module name is compiled in to Apache. The second format reverses the test, and only processes the directives if module name is not compiled in. The module name argument is a module name as given as the file name of the module, at the time it was compiled. For example, mod_rewrite.c. sections are nest-able, which can be used to implement simple multiple-module tests. -------------------------------------------------------------------------------- Include directive Syntax: Include filename Context: server config Status: Core Compatibility: Include is only available in Apache 1.3 and later. This directive allows inclusion of other configuration files from within the server configuration files. -------------------------------------------------------------------------------- KeepAlive directive Syntax: (Apache 1.1) KeepAlive max-requests Default: (Apache 1.1) KeepAlive 5 Syntax: (Apache 1.2) KeepAlive on/off Default: (Apache 1.2) KeepAlive On Context: server config Status: Core Compatibility: KeepAlive is only available in Apache 1.1 and later. This directive enables Keep-Alive support. Apache 1.1: Set max-requests to the maximum number of requests you want Apache to entertain per request. A limit is imposed to prevent a client from hogging your server resources. Set this to 0 to disable support. Apache 1.2 and later: Set to "On" to enable persistent connections, "Off" to disable. See also the MaxKeepAliveRequests directive. -----------------------------------------------

本站声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

相关专题

更多
php源码安装教程大全
php源码安装教程大全

本专题整合了php源码安装教程,阅读专题下面的文章了解更多详细内容。

150

2025.12.31

php网站源码教程大全
php网站源码教程大全

本专题整合了php网站源码相关教程,阅读专题下面的文章了解更多详细内容。

88

2025.12.31

视频文件格式
视频文件格式

本专题整合了视频文件格式相关内容,阅读专题下面的文章了解更多详细内容。

90

2025.12.31

不受国内限制的浏览器大全
不受国内限制的浏览器大全

想找真正自由、无限制的上网体验?本合集精选2025年最开放、隐私强、访问无阻的浏览器App,涵盖Tor、Brave、Via、X浏览器、Mullvad等高自由度工具。支持自定义搜索引擎、广告拦截、隐身模式及全球网站无障碍访问,部分更具备防追踪、去谷歌化、双内核切换等高级功能。无论日常浏览、隐私保护还是突破地域限制,总有一款适合你!

61

2025.12.31

出现404解决方法大全
出现404解决方法大全

本专题整合了404错误解决方法大全,阅读专题下面的文章了解更多详细内容。

493

2025.12.31

html5怎么播放视频
html5怎么播放视频

想让网页流畅播放视频?本合集详解HTML5视频播放核心方法!涵盖<video>标签基础用法、多格式兼容(MP4/WebM/OGV)、自定义播放控件、响应式适配及常见浏览器兼容问题解决方案。无需插件,纯前端实现高清视频嵌入,助你快速打造现代化网页视频体验。

16

2025.12.31

关闭win10系统自动更新教程大全
关闭win10系统自动更新教程大全

本专题整合了关闭win10系统自动更新教程大全,阅读专题下面的文章了解更多详细内容。

12

2025.12.31

阻止电脑自动安装软件教程
阻止电脑自动安装软件教程

本专题整合了阻止电脑自动安装软件教程,阅读专题下面的文章了解更多详细教程。

5

2025.12.31

html5怎么使用
html5怎么使用

想快速上手HTML5开发?本合集为你整理最实用的HTML5使用指南!涵盖HTML5基础语法、主流框架(如Bootstrap、Vue、React)集成方法,以及无需安装、直接在线编辑运行的平台推荐(如CodePen、JSFiddle)。无论你是新手还是进阶开发者,都能轻松掌握HTML5网页制作、响应式布局与交互功能开发,零配置开启高效前端编程之旅!

2

2025.12.31

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
SQL 教程
SQL 教程

共61课时 | 3.3万人学习

ASP教程
ASP教程

共36课时 | 20.4万人学习

李炎恢ASP基础视频教程
李炎恢ASP基础视频教程

共210课时 | 42.7万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号