From: Joshua Slive 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
The server also reads a file containing mime document types; the
filename is set by the TypesConfig directive, and is 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 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 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.
- 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 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
The server also reads a file containing mime document types; the
filename is set by the TypesConfig directive, and is 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 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 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.
- 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 Configuring Apache
-Main Configuration Files
+
+
+
+
+
+Main Configuration Files
+
+
+Related Modules
+
+
+mod_mime
+
+Related Directives
+AccessConfig
+<IfDefine>
+Include
+ResourceConfig
+TypesConfig
+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.mime.types
by default.
-Syntax of the Configuration Files
+
+
+Syntax of the Configuration Files
apachectl configtest
or the -t
command line option.
-Modules
+
+
+Modules
+
+
+Related Modules
+
+mod_so
+
+Related Directives
+AddModule
+ClearModuleList
+<IfModule>
+LoadModule
+-l
command line option.
-Scope of Directives
+
+
+Scope of Directives
+
+
+Related Directives
+<Directory>
+<DirectoryMatch>
+<Files>
+<FilesMatch>
+<Location>
+<LocationMatch>
+<VirtualHost>
+.htaccess Files
+
+
+.htaccess Files
+
+
+Related Directives
+AccessFileName
+AllowOverride
+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
+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.mime.types
by default.
-Syntax of the Configuration Files
+
+
+Syntax of the Configuration Files
apachectl configtest
or the -t
command line option.
-Modules
+
+
+Modules
+
+
+Related Modules
+
+mod_so
+
+Related Directives
+AddModule
+ClearModuleList
+<IfModule>
+LoadModule
+-l
command line option.
-Scope of Directives
+
+
+Scope of Directives
+
+
+Related Directives
+<Directory>
+<DirectoryMatch>
+<Files>
+<FilesMatch>
+<Location>
+<LocationMatch>
+<VirtualHost>
+.htaccess Files
+
+
+.htaccess Files
+
+
+Related Directives
+AccessFileName
+AllowOverride
+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.
+Related Modules - +mod_env +mod_rewrite +mod_setenvif +mod_unique_id - Related Directives+ |
+Related Directives -
+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.
+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.
+Related Modules - +mod_env +mod_rewrite +mod_setenvif +mod_unique_id - Related Directives+ |
+Related Directives -
+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.
+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.
+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)+
- -
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 -+
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 - -
- -
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.
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> ++ +
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 @@
+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)+
- -
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 -+
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 - -
- -
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.
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> ++ +
In order to implement the handler features, an addition has been made to the Apache API that you may wish to