锐英源软件
第一信赖

精通

英语

开源

擅长

开发

培训

胸怀四海 

第一信赖

当前位置:锐英源 / 英语翻译 / Apache / Apache模块定义
服务方向
人工智能数据处理
人工智能培训
kaldi数据准备
小语种语音识别
语音识别标注
语音识别系统
语音识别转文字
kaldi开发技术服务
软件开发
运动控制卡上位机
机械加工软件
软件开发培训
Java 安卓移动开发
VC++
C#软件
汇编和破解
驱动开发
联系方式
固话:0371-63888850
手机:138-0381-0136
Q Q:396806883
微信:ryysoft

锐英源精品开源心得,转载请注明:“锐英源www.wisestudy.cn,孙老师作品,电话13803810136。需要全文内容也请联系孙老师。

Apache模块定义

Config File: 配置文件:

A text file containing directives that control how the Web server should operate. Config files live in the conf subdirectory under the ServerRoot.
一个包含控制指令的文本文件,它控制Web服务器如何运作。配置文件放在 ServerRoot目录下conf子目录内。

Container: 容器:

A paired set of directives that define a scope within which the enclosed directives have effect. 成对的指令集,定义一个生效指令范围。

Sometimes a container and the directives enclosed within it care called a stanza. 有时,相关的容器和指令在一起被称为一个节。

Directive: 指令:

A one-line text command in a config file which instructs the server in some aspect of its operation. 在配置文件内的单行文本命令,它指示服务器在某些方面如何运行。

Directive names are not case-sensitive, but the arguments that follow them on the line usually are.指令名不区分大小写,但他们随后的参数,通常是这样。

Examples: User, DirectoryIndex. 例子:用户,DirectoryIndex。

DocumentRoot: 文件权限

The top of the directory tree where your Web content actually lives. 目录树的顶端,Web内容实际存放位置。

Internet Media Type: 互联网媒体类型:

An attribute of a document that describes the format of the content. The IMT is split into a major and minor portion, separated by a slash. Some examples are "text/plain" for normal unformated text or prose; "text/html" for text that contains HTML tags; "image/gif" denotes a binary image in GIF format; and "application/octet-stream" is frequently used to identify unknown or arbitrary binary content. IMTs are not case-sensitive; "text/plain" and "Text/Plain" are equivalent. This same major/minor syntax is used in other cases, such as when a browser indicates what types of content it can accept (e.g., "text/*").

一个文档的属性,描述内容格式。IMT分成一个主要和次要的部分,由一个斜杠隔开。例如“text/plain”对应正常的非格式化文本或散文;“text / html”文本包含html标签;“image/gif”表示GIF格式的二进制映像;“application/octet-stream”是经常使用的识别未知或任意的二进制内容。imt是不区分大小写;“text / plain”“Text/Plain”是等价的。这个主要/次要语法是使用在其他情况下,例如当浏览器显示它可以接受什么类型的内容(如、“text / *”)。

MIME Type: MIME类型:

MIME is an acronym for Multipurpose Internet Mail Extensions, a set of standards defining how mail of various types and contents can be exchanged. Since the MIME system defined a very flexible way of assigning attributes to message bodies, it was adopted by the Web, so you'll frequently hear about the 'MIME type' of a Web document. The more general term is Internet Media Type (q.v.), though.

MIME是多用途Internet邮件扩展,一组定义如何让不同类型和内容的邮件可以进行交换的标准的缩写。由于MIME系统定义分配属性信息体的方式非常灵活,它是由Web采纳,所以你会经常听到Web文档的MIME类型,更普遍的术语是网络媒体类型。

Overrides:覆盖:

The types of settings that can be changed by directives in .htaccess files. If the FileInfo keyword is in the list of allowed overrides, for example, that means that directives that affect file information in .htaccess files can override any settings declared at a broader scope. 在.htaccess文件里,可以通过指令来改变设置的类型。如果FileInfo关键字在列表中允许覆盖,这意味着在.htaccess文件的文件信息的指令可以影响覆盖在更广阔的范围内声明的任何设置。

Scope:范围:

A bounded portion of your server’s URI space or filesystem. Scopes are nestable, and directive effects typically are inherited from higher-level scopes. The narrowest applicable scope ultimately defines the attributes of Web resources within it.

服务器的URI空间或文件系统的一有限部分。作用域是可嵌套,指导作用通常是由更高级别的作用域继承。最终最适用范围定义了Web资源的属性。

ServerRoot: 服务器权限

The top of the directory tree where the server application itself, and all the configuration files, lives. 服务器应用程序本身,和所有的配置文件都在目录树的顶端。

Stanza: 节:

See container.看集合。

Virtual Hosting: 虚拟主机:

A means of making a single system appear to be multiple ones. 使得单系统的装置似乎是多个的。

What’s an Apache Module? Apache模块是什么?

Probably the first question should be “What’s Apache?” However, since this is a fairly advanced session, that’s really not appropriate. If you don’t know the answer to this question, you probably shouldn’t proceed any further until you learn more. This is definitely a coding session for geeks.

可能第一个问题应该是“Apache是什么?“然而,由于这是一个相当高级的会议,这确实不恰当的。如果你不知道这个问题的答案,你可能不应该进一步了解更多。这绝对是一个极客的编码会话。

An Apache module is a piece of compiled code (usually C) that is either built into the server executable image when the entire Apache package is constructed, or else an external fragment of code, called a DSO (‘dynamic shared object’) or DLL (‘dynamically loaded library’), that is activated by the server at run time.

Apache模块的编译后的代码(通常C),要么是当整个Apache包构造完成内置服务器可执行图像,或者外部的代码片段-称为DSO(动态共享对象)或DLL(动态加载的库),在运行时,服务器被激活。

Note: Although it’s tempting to apply the overused term plug-in to Apache modules, you really should resist. For one thing, modules are pieces of the server, and ‘plug-in’ frequently refers to client-side functionality. For another, no-one will know what you’re talking about until you’re all on the same wavelength and using the same terminology.

注意:尽管这可能导致过度使用术语插件植入Apache模块,你真的应该抵制。一方面,模块是服务器件,而'插件'经常是指客户端功能。另一方面,,没人会知道你在说什么,直到你们都在同一波长并且使用相同的术语。

The Apache Web server architecture allows you to augment the basic functionality and get your code involved at various stages of Web request processing. The extremes of the enhancement spectrum are modifying the base code itself, and using something like CGI, which is wholly outside the server. Modules fall into the middle ground.

Apache Web服务器架构允许您增加基本功能并让你的代码在Web请求处理的不同阶段。增强范围的极端正在修改基本代码自身,使用类似CGI,它是完全在服务器之外。模块落入中间地带

In order to build an Apache module, you need the rest of the Apache source and build environment. This isn’t as scary as it sounds; I don’t mean a full ADE like Visual J++. Rather, you just need the Apache source kit, an ANSI C compiler, and some basic tools (make, awk, sed, et cetera). If you’re building on Windows, you need Microsoft’s Visual Studio and Visual C++ V5.

为了建立一个Apache模块,您需要其余的Apache源和构建环境。这并不像听起来那么可怕;我不是说一个完整的ADE像 Visual J++。相反,你只需要Apache源代码组件、ANSI C编译器和一些基本工具(make、awk、sed等等)。如果你在Windows上建立,则需要微软的Visual Studio和Visual C ++ V5。

Note: There’s nothing stopping you from using some other development environment on Windows – but if you do, you’re going to have to port the existing stuff to use it. The Apache developers made the decision to use the Microsoft tools, so that’s how the scripts and makefiles are set up.

注意:没有什么能阻止你在Windows使用其他开发环境——但如果你这样做,你将不得不移植现有的东西来使用它。Apache开发人员决定使用微软的工具来设置脚本和生成文件。

You don’t need any development stuff at all in order to simply use a binary DSO or DLL module. However, since this is about writing modules, you can’t get off that easily.为了简单地使用一个二进制DSO或DLL模块你不需要任何开发的东西。然而,由于这是写模块,你不能那么轻易地离开。

Why a Module? 为什么要用模块?

With the full source available, and an external access mechanism like CGI supported, why would anyone want to write a module for Apache? Some reasons include: 有完整的源代码可用,并支持如CGI外部访问机制,为什么会有人想写一个Apache模块?原因如下:

· You want to make the functionality available on other systems without having to recompile the whole server on each one; 你想要在其他系统上使用可用的功能,而无需重在每一个服务器新编译整个;
· You want the functionality to be portable across multiple systems without having to worry about whether add-on tools like Perl are installed (or where); ·你想要的功能跨多个系统的移植,而不必担心是否附加工具如Perl安装(或位置;
· You want better performance than you can get from something like a CGI script. ·你想要比你可以从类似的CGI脚本中更好地性能。
Modules allow you to address these and other issues – but they are not a universal panacea. In some cases, writing a module might end up being like using a sledge hammer to drive a push-pin 模块可以解决这些问题和其他问题 - 但它们不是万能的。在一些情况下,写模块可能最终会像用大锤来驱动推针。

Before you give serious consideration to writing a module, ask yourself the following question: “What is it supposed to do?” Due to the phased processing model of the Apache architecture, there are clear types of functionality that are suited to realisation as modules. Other things just don’t fit into the model, and shoul be accomplished some other way.

在你认真考虑编写一个模块之前,问自己以下的问题:“应该怎么做?“由于Apache分阶段处理模型的体系结构,有明确的类型的适合实现的功能模块。其他的事情只是不符合这种模式,应该完成一些其他的方式。

These are the basic types of operations that the Apache module architecture is well-suited to handling: Apache模块体系结构非常适合处理这些是基本类型的操作:
· Securing access to Web resources ·确保访问网络资源
· Manipulating URLs ·操纵url
· Logging server activity ·日志服务器活动
· Providing/generating content ·提供/生成内容

A single module can perform more than one of these functions, though it’s not very common.

单个模块可以执行多个这些功能,尽管它不是常见的。

Examples of Apache Modules Apache模块的例子

Here are some examples of Apache modules and what they do. These are all distributed as part of the base Apache package:。这里有一些Apache模块的例子和他们的功能。这些都是基础的部分。
mod_auth

Simple text-based user/password access control; user credentials are looked up in a server-local database to see if they’re valid and grant access to the requested resource

简单的基于文本的用户名/密码访问控制;用户凭据查找在服务器本地数据库,看看他们是否是有效的,并授权访问请求的资源

mod_speling

If no resource can be found that exactly matches the request, this module looks around to see if there are any that are similarly spelt. If found, it will either automatically redirect the browser to the correctly-spelt document, or if there are multiple near-misses, will give the browser a list from which to choose.

如果没有可以找到完全匹配请求的资源,这个模块会看看四周有同样的拼写。如果找到了,它要么自动将浏览器重定向到正确拼写的文件,,或者如果有多个,会从浏览器的一个列表选择。

mod_rewrite

This is without doubt one of the most powerful and flexible modules in the base Apache package. It allows you to select documents or redirect to other URLs – even on other servers – based upon a dizzying array of possible criteria.

在Apache包中,这毫无疑问是一个最强大灵活的模块。它允许您选择文件或重定向到其他服务器的url——基于可能的标准让人眼花缭乱。

A large list of other modules people have written for Apache, but which aren’t part of the base distribution for whatever reason, can be found at <http://modules.apache.org/>. You should definitely give careful scrutiny to existing modules before embarking on the project of writing your own – unless you’re just doing it for fun.

写了大量的Apache模块,但一些没有发布的,可以在< http://modules.apache.org/ >中找到。在你自己的这个项目开始编写之前,你应该仔细审查现有的模块——除非你只是为了好玩。

友情链接
版权所有 Copyright(c)2004-2021 锐英源软件
公司注册号:410105000449586 豫ICP备08007559号 最佳分辨率 1024*768
地址:郑州大学北校区院(文化路97号院)内