search

APACHE(6)_PHP

Jun 01, 2016 pm 12:36 PM
nameinstructiondocumentservermodulestateprogramRecordthis

Apache

5.1.2 AuthDBMUserFile

语法: AuthDBMUserFile 文件名称
用於: directory, .htaccess
需求: AuthConfig
状态: 扩充
模组: mod_auth_dbm

AuthDBMUserFile 这个文件设定作为验认之用的 DBM 文件名称,其中
包含使用者与密码的列表。文件名称是该使用者文件的绝对路径。

这个文件是以使用者名称作为关键。使用者後的值是 crypt() 加密过
的密码,其後可以加上选择性的冒号以及随意的资料。服务器将会忽略
这些冒号跟资料。

安全: 确定 AuthDBMUserFile 存放在服务器的文件树之外;不要把它
放在它所要保护的目录里。否则客户端将能下载 AuthDBMUserFile 。

参阅 AuthName, AuthType 以及 AuthDBMGroupFile 。


5.2 mod_cookies 模组

这个模组包含在 mod_cookies.c 这个文件里,而且依预设不会编译进
去。它提供 Netscape(TM) cookies 。这个模组没有说明文件。


5.2.1 CookieLog

语法: CookieLog 文件名称
用於: server config, virtual host
状态: 实验
模组: mod_cookies

CookieLog 这个指令设定记录 cookies 用的文件名称。这个文件名称
是 ServerRoot 的相对目录。


5.3 mod_dld 模组

这个模组包含在 mod_dld.c 这个文件里,而且依预设不会编译进去。
它提供在启动时载入可执行文件及模组到服务器里去的功能,使用 GNU dld
程序库。


5.3.1 摘要

这个选用性的 dld 模组是一段作为观念证明(proof-of-concept)用的
程序码,它如同配置自己一般载入其它模组到服务器里去(只有第一次
;目前为止,重新读取配置档无法影响到已经载入的模组),使用 GNU
的动态连结程序库(DLD) 。它没有预设编译进去,因为不是每个人都有
DLD ,但是我在试的时候可以。(注意最後几个字)。

注意因为某些缘故,LoadFile /lib/libc.a 看来似乎是必须的。

注意: 当服务器起动时 DLD 需要读取在服务器程序之外的符号表格;
如果服务器在起动时不能找到它自己的程序码那麽这些指令就会失败。


5.3.2 LoadFile

语法: LoadFile 文件名称 文件名称 ...
用於: server config
状态: 实验
模组: mod_dld

LoadFile 这个指令在服务器起动时链结其所指名的目的档或程序库;
这是用来载入某些模组运作时也许需要的额外程序码。文件名称是相对
於 ServerRoot 的。


5.3.3 LoadModule

语法: LoadModule 模组 文件名称
用於: server config
状态: 实验
模组: mod_dld

LoaddModule 这个指令链结目的档或程序库的文件名称并且把所指名的
模组加入使用中模组的列表。模组是文件中型态为 module 的外部参数
。例如:

LoadModule ai_backcompat_module modules/mod_ai_backcompat.o
LoadFile /lib/libc.a

载入 ServerRoot 里的 modules 子目录下的模组。


5.4 mod_log_agent 模组

这个模组包含在 mod_log_agent.c 这个文件里,而且依预设不会编译
进去。它提供客户端使用者程序的记录功能。


5.4.1 AgentLog

语法: AgentLog 文件-管线
预设: AgentLog logs/agent_log
用於: server config, virtual host
状态: 扩充
模组: mod_log_agent

AgentLog 这个指令设定服务器记录进入之请求的文件名称,其内容为
UserAgent 此标头。文件-管线是这些其中之一:


一个文件名称
一个相对於 ServerRoot 的文件名称

`|' 跟随著一个指令
从标准输入接收参考记录资讯的程序。注意如果虚拟主机从主要
服务器继承 RefererLog 设定的话不会起动新的程序。


安全: 如果在此使用程序,它将会以起动 httpd 的使用者身分执行。
如果服务器由 root 起动那麽此程序就是由 root 执行;所以要确定次
程序的安全性。


这个指令是为了与 NCSA 1.4 相容而提供的。


5.5 mod_log_config 模组

这个模组包含在 mod_log_config.c 这个文件里,而且依预设不会编译
进去。它提供记录对服务器之请求的功能,使用由使用者指定的格式。


5.5.1 摘要

这是个实验性质的模组,它实作 TransferLog 这个指令(与一般记录
模组相同),以及另一个指令,LogFormat 。有错误也不会让我惊讶。

LogFormat 的参数是个字串,可以包含要复制到记录档里的文字,以及
如下所列的 `%' 指令:

%...h: 远端主机
%...l: 远端的签入名称(从 identd 得知,如果对方
有支援)
%...u: 远端使用者(从 auth 得知,如果回传的状态
(%S)为 401 的话那这有假造的可能)
%...t: 时间,一般的时间记录格式
%...r: 请求的第一行
%...s: 状态。用於遇到内部重导的请求,这是
{f original}请求的状态 --- %...>s 是
最後的。

%...b: 送出的位元组
%...{foobar}i: Foobar 的内容: 要送往客户端之请求里面的
标头行。
%...{foobar}o: Foobar 的内容: 在回覆(reply) 里的标头行

`...' 这个部份可以完全不要(e.g. "%h %u %r %s %b") ,或者它可以
表示要包含某项目的条件(如果不符合该条件那麽它会被 `-' 取代)
。要注意的是,在字串上的 %r, %...i 以及 %...o 没有脱离的实作
(no escaping performed); 有些记性很好的人可能记得我认为这不是
个好主意,直到现在,我仍然对它很感冒,但是要看出如何以 `%...i'
‘做正确的事’是很困难的,除非我们 URL-escape 每一件事并以 CLF
打断它们。

条件的形式是一份 HTTP 状态码的列表,可能有也可能没有 `!' 前导
。因此 `%400,501{User-agent}i' 记录 User-agent: 只对错误状态
400 及 501(错误请求,没有实作)作用;`%!200,304,302{Referer}i'
记录 Referer: 对所有没回传正常状态的请求作用。

预设的 LogFormat 重现 CFL; 如下。

配合虚拟主机使用的想法如下: 虚拟主机可以拥有它自己的 LogFormat
,或是它自己的 TransferLog。如果它没有自己的 LogFormat,它就从
主要服务器继承。如果它没有自己的 TransferLog,他就写到相同的描
述子(descriptor)去(意指相同的 `|...' 程序)。  



以上摘自PHPUSER。COM
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
PHP vs. Python: Understanding the DifferencesPHP vs. Python: Understanding the DifferencesApr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP: Is It Dying or Simply Adapting?PHP: Is It Dying or Simply Adapting?Apr 11, 2025 am 12:13 AM

PHP is not dying, but constantly adapting and evolving. 1) PHP has undergone multiple version iterations since 1994 to adapt to new technology trends. 2) It is currently widely used in e-commerce, content management systems and other fields. 3) PHP8 introduces JIT compiler and other functions to improve performance and modernization. 4) Use OPcache and follow PSR-12 standards to optimize performance and code quality.

The Future of PHP: Adaptations and InnovationsThe Future of PHP: Adaptations and InnovationsApr 11, 2025 am 12:01 AM

The future of PHP will be achieved by adapting to new technology trends and introducing innovative features: 1) Adapting to cloud computing, containerization and microservice architectures, supporting Docker and Kubernetes; 2) introducing JIT compilers and enumeration types to improve performance and data processing efficiency; 3) Continuously optimize performance and promote best practices.

When would you use a trait versus an abstract class or interface in PHP?When would you use a trait versus an abstract class or interface in PHP?Apr 10, 2025 am 09:39 AM

In PHP, trait is suitable for situations where method reuse is required but not suitable for inheritance. 1) Trait allows multiplexing methods in classes to avoid multiple inheritance complexity. 2) When using trait, you need to pay attention to method conflicts, which can be resolved through the alternative and as keywords. 3) Overuse of trait should be avoided and its single responsibility should be maintained to optimize performance and improve code maintainability.

What is a Dependency Injection Container (DIC) and why use one in PHP?What is a Dependency Injection Container (DIC) and why use one in PHP?Apr 10, 2025 am 09:38 AM

Dependency Injection Container (DIC) is a tool that manages and provides object dependencies for use in PHP projects. The main benefits of DIC include: 1. Decoupling, making components independent, and the code is easy to maintain and test; 2. Flexibility, easy to replace or modify dependencies; 3. Testability, convenient for injecting mock objects for unit testing.

Explain the SPL SplFixedArray and its performance characteristics compared to regular PHP arrays.Explain the SPL SplFixedArray and its performance characteristics compared to regular PHP arrays.Apr 10, 2025 am 09:37 AM

SplFixedArray is a fixed-size array in PHP, suitable for scenarios where high performance and low memory usage are required. 1) It needs to specify the size when creating to avoid the overhead caused by dynamic adjustment. 2) Based on C language array, directly operates memory and fast access speed. 3) Suitable for large-scale data processing and memory-sensitive environments, but it needs to be used with caution because its size is fixed.

How does PHP handle file uploads securely?How does PHP handle file uploads securely?Apr 10, 2025 am 09:37 AM

PHP handles file uploads through the $\_FILES variable. The methods to ensure security include: 1. Check upload errors, 2. Verify file type and size, 3. Prevent file overwriting, 4. Move files to a permanent storage location.

What is the Null Coalescing Operator (??) and Null Coalescing Assignment Operator (??=)?What is the Null Coalescing Operator (??) and Null Coalescing Assignment Operator (??=)?Apr 10, 2025 am 09:33 AM

In JavaScript, you can use NullCoalescingOperator(??) and NullCoalescingAssignmentOperator(??=). 1.??Returns the first non-null or non-undefined operand. 2.??= Assign the variable to the value of the right operand, but only if the variable is null or undefined. These operators simplify code logic, improve readability and performance.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)