From 203fdead70d90b45348869a5a3722f545d0c6722 Mon Sep 17 00:00:00 2001 From: Joshua Slive Date: Mon, 23 Oct 2000 21:59:33 +0000 Subject: [PATCH] Style changes and small content changes to handler.html. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86725 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/configuring.html | 86 ++++++++++++-- docs/manual/configuring.html.en | 86 ++++++++++++-- docs/manual/env.html | 85 +++++++------- docs/manual/env.html.en | 85 +++++++------- docs/manual/handler.html | 199 +++++++++++++------------------- docs/manual/handler.html.en | 199 +++++++++++++------------------- 6 files changed, 404 insertions(+), 336 deletions(-) diff --git a/docs/manual/configuring.html b/docs/manual/configuring.html index d2aa794a96..26302c3df7 100644 --- a/docs/manual/configuring.html +++ b/docs/manual/configuring.html @@ -15,7 +15,32 @@

Configuring Apache

-

Main Configuration Files

+ + +
+ +

Main Configuration Files

+ + + +
+Related Modules

+mod_mime
+
+Related Directives

+AccessConfig
+<IfDefine>
+Include
+ResourceConfig
+TypesConfig
+

Apache is configured by placing directives in plain text configuration files. The main @@ -28,14 +53,16 @@ reasons. In addition, other configuration files may be added using the Include directive. Any directive may be placed in any of these configuration files. Changes to the main configuration files are only recognized by -Apache when it is started or restarted. +Apache when it is started or restarted.

The server also reads a file containing mime document types; the filename is set by the TypesConfig directive, and is mime.types by default. -

Syntax of the Configuration Files

+
+ +

Syntax of the Configuration Files

Apache configuration files contain one directive per line. The back-slash "\" may be used as the last character on a line to indicate @@ -55,23 +82,53 @@ a directive are ignored, so you may indent directives for clarity. starting the server by using apachectl configtest or the -t command line option. -

Modules

+
+ +

Modules

+ + +
+Related Modules

+mod_so
+
+Related Directives

+AddModule
+ClearModuleList
+<IfModule>
+LoadModule
+

Apache is a modular server. This implies that only the most basic functionality is included in the core server. Extended features are -available through modules which can -be loaded into Apache. By default, a modules which +can be loaded into Apache. By default, a base set of modules is included in the server at compile-time. If the server is compiled to use dynamically loaded modules, then modules can be compiled separately and added at any time using the LoadModule directive. Otherwise, Apache must be recompiled to add or remove modules. +Configuration directives may be included conditional on a presence of +a particular module by enclosing them in an <IfModule> block.

To see which modules are currently compiled into the server, you can use the -l command line option. -

Scope of Directives

+
+ +

Scope of Directives

+ +
+Related Directives

+<Directory>
+<DirectoryMatch>
+<Files>
+<FilesMatch>
+<Location>
+<LocationMatch>
+<VirtualHost>
+

Directives placed in the main configuration files apply to the entire server. If you wish to change the configuration for only a part of @@ -105,7 +162,15 @@ For further information, we provide details on How Directory, Location and Files sections work. -

.htaccess Files

+
+ +

.htaccess Files

+ +
+Related Directives

+AccessFileName
+AllowOverride
+

Apache allows for decentralized management of configuration via special files placed inside the web tree. The special files are @@ -127,7 +192,10 @@ configuring the AllowOverride directive in the main configuration files. -

Log files

+
+ +

Log files

+

security warning

Anyone who can write to the directory where Apache is writing a log file can almost certainly gain access to the uid that the server is diff --git a/docs/manual/configuring.html.en b/docs/manual/configuring.html.en index d2aa794a96..26302c3df7 100644 --- a/docs/manual/configuring.html.en +++ b/docs/manual/configuring.html.en @@ -15,7 +15,32 @@

Configuring Apache

-

Main Configuration Files

+ + +
+ +

Main Configuration Files

+ + + +
+Related Modules

+mod_mime
+
+Related Directives

+AccessConfig
+<IfDefine>
+Include
+ResourceConfig
+TypesConfig
+

Apache is configured by placing directives in plain text configuration files. The main @@ -28,14 +53,16 @@ reasons. In addition, other configuration files may be added using the Include directive. Any directive may be placed in any of these configuration files. Changes to the main configuration files are only recognized by -Apache when it is started or restarted. +Apache when it is started or restarted.

The server also reads a file containing mime document types; the filename is set by the TypesConfig directive, and is mime.types by default. -

Syntax of the Configuration Files

+
+ +

Syntax of the Configuration Files

Apache configuration files contain one directive per line. The back-slash "\" may be used as the last character on a line to indicate @@ -55,23 +82,53 @@ a directive are ignored, so you may indent directives for clarity. starting the server by using apachectl configtest or the -t command line option. -

Modules

+
+ +

Modules

+ + +
+Related Modules

+mod_so
+
+Related Directives

+AddModule
+ClearModuleList
+<IfModule>
+LoadModule
+

Apache is a modular server. This implies that only the most basic functionality is included in the core server. Extended features are -available through modules which can -be loaded into Apache. By default, a modules which +can be loaded into Apache. By default, a base set of modules is included in the server at compile-time. If the server is compiled to use dynamically loaded modules, then modules can be compiled separately and added at any time using the LoadModule directive. Otherwise, Apache must be recompiled to add or remove modules. +Configuration directives may be included conditional on a presence of +a particular module by enclosing them in an <IfModule> block.

To see which modules are currently compiled into the server, you can use the -l command line option. -

Scope of Directives

+
+ +

Scope of Directives

+ +
+Related Directives

+<Directory>
+<DirectoryMatch>
+<Files>
+<FilesMatch>
+<Location>
+<LocationMatch>
+<VirtualHost>
+

Directives placed in the main configuration files apply to the entire server. If you wish to change the configuration for only a part of @@ -105,7 +162,15 @@ For further information, we provide details on How Directory, Location and Files sections work. -

.htaccess Files

+
+ +

.htaccess Files

+ +
+Related Directives

+AccessFileName
+AllowOverride
+

Apache allows for decentralized management of configuration via special files placed inside the web tree. The special files are @@ -127,7 +192,10 @@ configuring the AllowOverride directive in the main configuration files. -

Log files

+
+ +

Log files

+

security warning

Anyone who can write to the directory where Apache is writing a log file can almost certainly gain access to the uid that the server is diff --git a/docs/manual/env.html b/docs/manual/env.html index 151595fd60..64f7ea8bb3 100644 --- a/docs/manual/env.html +++ b/docs/manual/env.html @@ -22,37 +22,37 @@ communicate with other programs like CGI scripts. This document explains some of the ways to use environment variables in Apache.


Setting Environment Variables

-

Related Modules

+ +
+Related Modules

- +mod_env
+mod_rewrite
+mod_setenvif
+mod_unique_id
-

Related Directives

+
+Related Directives

- +BrowserMatch
+BrowserMatchNoCase
+PassEnv
+RewriteRule
+SetEnv
+SetEnvIf
+SetEnvIfNoCase
+UnsetEnv
+

The most basic way to set an environment variable in Apache is using the unconditional SetEnv directive. Variables @@ -75,28 +75,27 @@ to be unique across "all" requests under very specific conditions.

Using Environment Variables

-

Related Modules

+
+Related Modules

- +mod_access
+mod_cgi
+mod_include
+mod_log_config
+mod_rewrite
-

Related Directives

+
+Related Directives

- +Allow from env=
+CustomLog +(conditional)
+Deny from env=
+LogFormat
+RewriteCond
+RewriteRule
+

One of the primary uses of environment variables is to communicate information to CGI scripts. In addition to all environment variables @@ -138,7 +137,11 @@ log requests from clients which are outside your subnet.

The %{ENV:...} form of TestString in the RewriteCond allows mod_rewrite's rewrite engine to make -decisions conditional on environment variables. +decisions conditional on environment variables. Note that the +variables accessible in mod_rewrite without the ENV: +prefix are not actually environment variables. Rather, they +are variables special to mod_rewrite which cannot be accessed from +other modules.


diff --git a/docs/manual/env.html.en b/docs/manual/env.html.en index 151595fd60..64f7ea8bb3 100644 --- a/docs/manual/env.html.en +++ b/docs/manual/env.html.en @@ -22,37 +22,37 @@ communicate with other programs like CGI scripts. This document explains some of the ways to use environment variables in Apache.


Setting Environment Variables

-

Related Modules

+ +
+Related Modules

- +mod_env
+mod_rewrite
+mod_setenvif
+mod_unique_id
-

Related Directives

+
+Related Directives

- +BrowserMatch
+BrowserMatchNoCase
+PassEnv
+RewriteRule
+SetEnv
+SetEnvIf
+SetEnvIfNoCase
+UnsetEnv
+

The most basic way to set an environment variable in Apache is using the unconditional SetEnv directive. Variables @@ -75,28 +75,27 @@ to be unique across "all" requests under very specific conditions.

Using Environment Variables

-

Related Modules

+
+Related Modules

- +mod_access
+mod_cgi
+mod_include
+mod_log_config
+mod_rewrite
-

Related Directives

+
+Related Directives

- +Allow from env=
+CustomLog +(conditional)
+Deny from env=
+LogFormat
+RewriteCond
+RewriteRule
+

One of the primary uses of environment variables is to communicate information to CGI scripts. In addition to all environment variables @@ -138,7 +137,11 @@ log requests from clients which are outside your subnet.

The %{ENV:...} form of TestString in the RewriteCond allows mod_rewrite's rewrite engine to make -decisions conditional on environment variables. +decisions conditional on environment variables. Note that the +variables accessible in mod_rewrite without the ENV: +prefix are not actually environment variables. Rather, they +are variables special to mod_rewrite which cannot be accessed from +other modules.


diff --git a/docs/manual/handler.html b/docs/manual/handler.html index 72f16fd170..814ff4c458 100644 --- a/docs/manual/handler.html +++ b/docs/manual/handler.html @@ -15,26 +15,58 @@

Apache's Handler Use

-

What is a Handler

+ + +
+

What is a Handler

+ + + + +
+Related Modules

+ +mod_actions
+mod_asis
+mod_cgi
+mod_imap
+mod_info
+mod_include
+mod_mime
+mod_negotiation
+mod_status
+
+Related Directives

+ +Action
+AddHandler
+RemoveHandler
+SetHandler
+
+

A "handler" is an internal Apache representation of the action to be performed when a file is called. Generally, files have implicit handlers, based on the file type. Normally, all files are simply -served by the server, but certain file typed are "handled" -separately. For example, you may use a type of -"application/x-httpd-cgi" to invoke CGI scripts.

+served by the server, but certain file types are "handled" +separately.

-

Apache 1.1 adds the additional ability to use handlers -explicitly. Either based on filename extensions or on location, these -handlers are unrelated to file type. This is advantageous both because -it is a more elegant solution, but it also allows for both a type -and a handler to be associated with a file (See also -Files with Multiple Extensions) +

Apache 1.1 adds the ability to use handlers explicitly. Based on +either filename extensions or on location, handlers can be specified +without relation to file type. This is advantageous both because it is +a more elegant solution, and because it also allows for both a type +and a handler to be associated with a file. (See also +Files with Multiple +Extensions.)

-

Handlers can either be built into the server or to a module, or -they can be added with the Handlers can either be built into the server, included in a module, +or they can be added with the Action directive. The built-in handlers in the standard distribution are as follows:

@@ -50,128 +82,59 @@ handlers in the standard distribution are as follows:

Treat the file as a CGI script. (mod_cgi)
  • imap-file: - Imagemap rule file. + Parse as an imagemap rule file. (mod_imap)
  • server-info: - Get the server's configuration information + Get the server's configuration information. (mod_info)
  • server-parsed: - Parse for server-side includes + Parse for server-side includes. (mod_include)
  • server-status: - Get the server's status report + Get the server's status report. (mod_status)
  • type-map: - Parse as a type map file for content negotiation + Parse as a type map file for content negotiation. (mod_negotiation) -

    +


    -

    Directives

    - +

    Examples

    -
    - -

    AddHandler

    - -Syntax: AddHandler handler-name extension extension...
    -Context: server config, virtual host, directory, .htaccess
    -Override: FileInfo
    -Status: Base
    -Module: mod_mime
    -Compatibility: AddHandler is only available in Apache -1.1 and later

    - -

    AddHandler maps the filename extensions extension to the -handler handler-name. This mapping is added to any already -in force, overriding any mappings that already exist for the same -extension. - -For example, to activate CGI scripts -with the file extension ".cgi", you might use: -

    -    AddHandler cgi-script cgi
    -
    +

    Modifying static content using a CGI script

    -

    Once that has been put into your srm.conf or httpd.conf file, any -file containing the ".cgi" extension will be treated as a -CGI program.

    - -

    - -See also: Files with -multiple extensions - -


    - -

    SetHandler

    - -Syntax: SetHandler handler-name
    -Context: directory, .htaccess
    -Status: Base
    -Module: mod_mime
    -Compatibility: SetHandler is only available in Apache -1.1 and later.

    - -

    When placed into an .htaccess file or a -<Directory> or <Location> -section, this directive forces all matching files to be parsed through -the handler given by handler-name. For example, if you had a -directory you wanted to be parsed entirely as imagemap rule files, -regardless of extension, you might put the following into an -.htaccess file in that directory: -

    -    SetHandler imap-file
    -
    +

    The following directives will cause requests for files with the +html extension to trigger the launch of the +footer.pl CGI script.

    -

    Another example: if you wanted to have the server display a status -report whenever a URL of http://servername/status was -called, you might put the following into access.conf: -

    -    <Location /status>
    -    SetHandler server-status
    -    </Location>
    -
    -
    +
    +     Action add-footer /cgi-bin/footer.pl
    +     AddHandler add-footer html
    +
    + +

    Then the CGI script is responsible for sending the originally +requested document (pointed to by the PATH_TRANSLATED +environment variable) and making whatever modifications or additions +are desired.

    + +

    Files with HTTP headers

    + +

    The following directives will enable the send-as-is +handler, which is used for files which contain their own HTTP headers. +All files in the /web/htdocs/asis/ directory will be +processed by the send-as-is handler, regardless of their +filename extensions.

    + +
    +    <Directory /web/htdocs/asis>
    +    SetHandler send-as-is
    +    </Directory>
    +
    + +
    -

    Programmer's Note

    +

    Programmer's Note

    In order to implement the handler features, an addition has been made to the Apache API that you may wish to diff --git a/docs/manual/handler.html.en b/docs/manual/handler.html.en index 72f16fd170..814ff4c458 100644 --- a/docs/manual/handler.html.en +++ b/docs/manual/handler.html.en @@ -15,26 +15,58 @@

    Apache's Handler Use

    -

    What is a Handler

    + + +
    +

    What is a Handler

    + + + + +
    +Related Modules

    + +mod_actions
    +mod_asis
    +mod_cgi
    +mod_imap
    +mod_info
    +mod_include
    +mod_mime
    +mod_negotiation
    +mod_status
    +
    +Related Directives

    + +Action
    +AddHandler
    +RemoveHandler
    +SetHandler
    +
    +

    A "handler" is an internal Apache representation of the action to be performed when a file is called. Generally, files have implicit handlers, based on the file type. Normally, all files are simply -served by the server, but certain file typed are "handled" -separately. For example, you may use a type of -"application/x-httpd-cgi" to invoke CGI scripts.

    +served by the server, but certain file types are "handled" +separately.

    -

    Apache 1.1 adds the additional ability to use handlers -explicitly. Either based on filename extensions or on location, these -handlers are unrelated to file type. This is advantageous both because -it is a more elegant solution, but it also allows for both a type -and a handler to be associated with a file (See also -Files with Multiple Extensions) +

    Apache 1.1 adds the ability to use handlers explicitly. Based on +either filename extensions or on location, handlers can be specified +without relation to file type. This is advantageous both because it is +a more elegant solution, and because it also allows for both a type +and a handler to be associated with a file. (See also +Files with Multiple +Extensions.)

    -

    Handlers can either be built into the server or to a module, or -they can be added with the Handlers can either be built into the server, included in a module, +or they can be added with the Action directive. The built-in handlers in the standard distribution are as follows:

    @@ -50,128 +82,59 @@ handlers in the standard distribution are as follows:

    Treat the file as a CGI script. (mod_cgi)
  • imap-file: - Imagemap rule file. + Parse as an imagemap rule file. (mod_imap)
  • server-info: - Get the server's configuration information + Get the server's configuration information. (mod_info)
  • server-parsed: - Parse for server-side includes + Parse for server-side includes. (mod_include)
  • server-status: - Get the server's status report + Get the server's status report. (mod_status)
  • type-map: - Parse as a type map file for content negotiation + Parse as a type map file for content negotiation. (mod_negotiation) -

    +


    -

    Directives

    - +

    Examples

    -
    - -

    AddHandler

    - -Syntax: AddHandler handler-name extension extension...
    -Context: server config, virtual host, directory, .htaccess
    -Override: FileInfo
    -Status: Base
    -Module: mod_mime
    -Compatibility: AddHandler is only available in Apache -1.1 and later

    - -

    AddHandler maps the filename extensions extension to the -handler handler-name. This mapping is added to any already -in force, overriding any mappings that already exist for the same -extension. - -For example, to activate CGI scripts -with the file extension ".cgi", you might use: -

    -    AddHandler cgi-script cgi
    -
    +

    Modifying static content using a CGI script

    -

    Once that has been put into your srm.conf or httpd.conf file, any -file containing the ".cgi" extension will be treated as a -CGI program.

    - -

    - -See also: Files with -multiple extensions - -


    - -

    SetHandler

    - -Syntax: SetHandler handler-name
    -Context: directory, .htaccess
    -Status: Base
    -Module: mod_mime
    -Compatibility: SetHandler is only available in Apache -1.1 and later.

    - -

    When placed into an .htaccess file or a -<Directory> or <Location> -section, this directive forces all matching files to be parsed through -the handler given by handler-name. For example, if you had a -directory you wanted to be parsed entirely as imagemap rule files, -regardless of extension, you might put the following into an -.htaccess file in that directory: -

    -    SetHandler imap-file
    -
    +

    The following directives will cause requests for files with the +html extension to trigger the launch of the +footer.pl CGI script.

    -

    Another example: if you wanted to have the server display a status -report whenever a URL of http://servername/status was -called, you might put the following into access.conf: -

    -    <Location /status>
    -    SetHandler server-status
    -    </Location>
    -
    -
    +
    +     Action add-footer /cgi-bin/footer.pl
    +     AddHandler add-footer html
    +
    + +

    Then the CGI script is responsible for sending the originally +requested document (pointed to by the PATH_TRANSLATED +environment variable) and making whatever modifications or additions +are desired.

    + +

    Files with HTTP headers

    + +

    The following directives will enable the send-as-is +handler, which is used for files which contain their own HTTP headers. +All files in the /web/htdocs/asis/ directory will be +processed by the send-as-is handler, regardless of their +filename extensions.

    + +
    +    <Directory /web/htdocs/asis>
    +    SetHandler send-as-is
    +    </Directory>
    +
    + +
    -

    Programmer's Note

    +

    Programmer's Note

    In order to implement the handler features, an addition has been made to the Apache API that you may wish to -- 2.50.1