From 14a01a807fa0ffa4e24da19d57a9b094aef9ab9b Mon Sep 17 00:00:00 2001 From: "Jason S. Lingohr" Date: Sun, 22 Jun 2003 15:31:23 +0000 Subject: [PATCH] Removed superfluous whitespace. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100328 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/bind.xml | 8 ++-- docs/manual/cgi_path.xml | 2 +- docs/manual/custom-error.xml | 72 ++++++++++++++--------------- docs/manual/env.xml | 88 ++++++++++++++++++------------------ 4 files changed, 85 insertions(+), 85 deletions(-) diff --git a/docs/manual/bind.xml b/docs/manual/bind.xml index 33bf709ec8..efd9dedf09 100644 --- a/docs/manual/bind.xml +++ b/docs/manual/bind.xml @@ -9,13 +9,13 @@

Configuring Apache to listen on specific addresses and ports.

- + Virtual Hosts DNS Issues
Overview - + core @@ -26,8 +26,8 @@ Listen - - + +

When Apache starts, it binds to some port and address on the local machine and waits for incoming requests. By default, it listens to all addresses on the machine. However, it needs to diff --git a/docs/manual/cgi_path.xml b/docs/manual/cgi_path.xml index 0d73a27dab..e714c46e76 100644 --- a/docs/manual/cgi_path.xml +++ b/docs/manual/cgi_path.xml @@ -29,7 +29,7 @@ Alias /cgi-ralph /usr/local/httpd/cgi-bin/user.cgi/ralph - +

In this case, user.cgi is the CGI script, the "/ralph" is information to be passed onto the CGI. If this configuration was in place, and a request came for diff --git a/docs/manual/custom-error.xml b/docs/manual/custom-error.xml index 6aaf2a589c..663b40343f 100644 --- a/docs/manual/custom-error.xml +++ b/docs/manual/custom-error.xml @@ -3,53 +3,53 @@ - + Custom Error Responses - +

Additional functionality allows webmasters to configure the response of Apache to some error or problem.

- +

Customizable responses can be defined to be activated in the event of a server detected error or problem.

- +

If a script crashes and produces a "500 Server Error" response, then this response can be replaced with either some friendlier text or by a redirection to another URL (local or external).

- +
Behavior - +
Old Behavior - +

NCSA httpd 1.3 would return some boring old error/problem message which would often be meaningless to the user, and would provide no means of logging the symptoms which caused it.

- +
New Behavior - +

The server can be asked to:

- +
  1. Display some other text, instead of the NCSA hard coded messages, or
  2. - +
  3. redirect to a local URL, or
  4. - +
  5. redirect to an external URL.
- +

Redirecting to another URL can be useful, but only if some information can be passed which can then be used to explain and/or log the error/problem more clearly.

- +

To achieve this, Apache will define new CGI-like environment variables:

- + REDIRECT_HTTP_ACCEPT=*/*, image/gif, image/x-xbitmap, image/jpeg
@@ -64,9 +64,9 @@ REDIRECT_SERVER_SOFTWARE=Apache/0.8.15
REDIRECT_URL=/cgi-bin/buggy.pl
- +

Note the REDIRECT_ prefix.

- +

At least REDIRECT_URL and REDIRECT_QUERY_STRING will be passed to the new URL (assuming it's a cgi-script or a cgi-include). The @@ -78,16 +78,16 @@ as the server).

- +
Configuration - +

Use of ErrorDocument is enabled for .htaccess files when the AllowOverride is set accordingly.

- +

Here are some examples...

- + ErrorDocument 500 /cgi-bin/crash-recover
ErrorDocument 500 "Sorry, our script crashed. Oh dear"
@@ -95,44 +95,44 @@ ErrorDocument 404 /Lame_excuses/not_found.html
ErrorDocument 401 /Subscription/how_to_subscribe.html
- +

The syntax is,

- + ErrorDocument <3-digit-code> <action> - +

where the action can be,

- +
  1. Text to be displayed. Prefix the text with a quote ("). Whatever follows the quote is displayed. Note: the (") prefix isn't displayed.
  2. - +
  3. An external URL to redirect to.
  4. - +
  5. A local URL to redirect to.
- +
Custom Error Responses and Redirects - +

Apache's behavior to redirected URLs has been modified so that additional environment variables are available to a script/server-include.

- +
Old behavior - +

Standard CGI vars were made available to a script which has been redirected to. No indication of where the redirection came from was provided.

- +
New behavior - +

A new batch of environment variables will be initialized for use by a script which has been redirected to. Each new variable will have the prefix REDIRECT_. @@ -145,21 +145,21 @@ and REDIRECT_STATUS to help the script trace its origin. Both the original URL and the URL being redirected to can be logged in the access log.

- +

If the ErrorDocument specifies a local redirect to a CGI script, the script should include a "Status:" header field in its output in order to ensure the propagation all the way back to the client of the error condition that caused it to be invoked. For instance, a Perl ErrorDocument script might include the following:

- + ...
print "Content-type: text/html\n";
printf "Status: %s Condition Intercepted\n", $ENV{"REDIRECT_STATUS"};
...
- +

If the script is dedicated to handling a particular error condition, such as 404 Not Found, it can use the specific code and error text instead.

diff --git a/docs/manual/env.xml b/docs/manual/env.xml index fc2ef798e6..cacfec8bb9 100644 --- a/docs/manual/env.xml +++ b/docs/manual/env.xml @@ -14,7 +14,7 @@ also used as a mechanism to communicate with external programs such as CGI scripts. This document discusses different ways to manipulate and use these variables.

- +

Although these variables are referred to as environment variables, they are not the same as the environment variables controlled by the underlying operating system. @@ -48,20 +48,20 @@ UnsetEnv - +

Basic Environment Manipulation - +

The most basic way to set an environment variable in Apache is using the unconditional SetEnv directive. Variables may also be passed from the environment of the shell which started the server using the PassEnv directive.

- +
Conditional Per-Request Settings - +

For additional flexibility, the directives provided by mod_setenvif allow environment variables to be set on a per-request basis, conditional on characteristics of particular @@ -71,41 +71,41 @@ is available through the mod_rewrite's RewriteRule which uses the [E=...] option to set environment variables.

- +
Unique Identifiers - +

Finally, mod_unique_id sets the environment variable UNIQUE_ID for each request to a value which is guaranteed to be unique across "all" requests under very specific conditions.

- +
Standard CGI Variables - +

In addition to all environment variables set within the Apache configuration and passed from the shell, CGI scripts and SSI pages are provided with a set of environment variables containing meta-information about the request as required by the CGI specification.

- +
Some Caveats - +
  • It is not possible to override or change the standard CGI variables using the environment manipulation directives.
  • - +
  • When suexec is used to launch CGI scripts, the environment will be cleaned down to a set of safe variables before CGI scripts are launched. The list of safe variables is defined at compile-time in suexec.c.
  • - +
  • For portability reasons, the names of environment variables may contain only letters, numbers, and the underscore character. In addition, the first character may @@ -117,7 +117,7 @@
Using Environment Variables - + mod_authz_host @@ -142,18 +142,18 @@
CGI Scripts - +

One of the primary uses of environment variables is to communicate information to CGI scripts. As discussed above, the environment passed to CGI scripts includes standard meta-information about the request in addition to any variables set within the Apache configuration. For more details, see the CGI tutorial.

- +
SSI Pages - +

Server-parsed (SSI) documents processed by mod_include's INCLUDES filter can print environment variables using the echo element, and can use environment @@ -162,11 +162,11 @@ provides SSI pages with the standard CGI environment variables as discussed above. For more details, see the SSI tutorial.

- +
Access Control - +

Access to the server can be controlled based on the value of environment variables using the allow from env= and deny from env= directives. In combination with @@ -175,11 +175,11 @@ characteristics of the client. For example, you can use these directives to deny access to a particular browser (User-Agent).

- +
Conditional Logging - +

Environment variables can be logged in the access log using the LogFormat option %e. In addition, the decision on whether @@ -192,11 +192,11 @@ requests for filenames ending in gif, or you can choose to only log requests from clients which are outside your subnet.

- +
Conditional Response Headers - +

The Header directive can use the presence or absence of an environment variable to determine whether or not @@ -204,7 +204,7 @@ client. This allows, for example, a certain response header to be sent only if a corresponding header is received in the request from the client.

- +
@@ -219,7 +219,7 @@
URL Rewriting - +

The %{ENV:...} form of TestString in the RewriteCond allows mod_rewrite's rewrite @@ -230,10 +230,10 @@ which cannot be accessed from other modules.

- +
Special Purpose Environment Variables - +

Interoperability problems have led to the introduction of mechanisms to modify the way Apache behaves when talking to particular clients. To make these mechanisms as flexible as @@ -242,17 +242,17 @@ >BrowserMatch, though SetEnv and PassEnv could also be used, for example.

- +
downgrade-1.0 - +

This forces the request to be treated as a HTTP/1.0 request even if it was in a later dialect.

- +
force-no-vary - +

This causes any Vary fields to be removed from the response header before it is sent back to the client. Some clients don't interpret this field correctly; setting this @@ -262,7 +262,7 @@

force-response-1.0 - +

This forces an HTTP/1.0 response to clients making an HTTP/1.0 request. It was originally implemented as a result of a problem with AOL's proxies. Some @@ -293,33 +293,33 @@

nokeepalive - +

This disables KeepAlive when set.

- +
prefer-language - +

This influences mod_negotiation's behaviour. If it contains a language tag (such as en, ja or x-klingon), mod_negotiation tries to deliver a variant with that language. If there's no such variant, the normal negotiation process applies.

- +
redirect-carefully - +

This forces the server to be more careful when sending a redirect to the client. This is typically used when a client has a known problem handling redirects. This was originally implemented as a result of a problem with Microsoft's WebFolders software which has a problem handling redirects on directory resources via DAV methods.

- +
@@ -346,10 +346,10 @@
Examples - +
Changing protocol behavior with misbehaving clients - +

We recommend that the following lines be included in httpd.conf to deal with known client problems.

@@ -376,7 +376,7 @@ BrowserMatch "JDK/1\.0" force-response-1.0
Do not log requests for images in the access log - +

This example keeps requests for images from appearing in the access log. It can be easily modified to prevent logging of particular directories, or to prevent logging of requests @@ -386,11 +386,11 @@ SetEnvIf Request_URI \.gif image-request SetEnvIf Request_URI \.jpg image-request SetEnvIf Request_URI \.png image-request CustomLog logs/access_log common env=!image-request - +

Prevent "Image Theft" - +

This example shows how to keep people not on your server from using images on your server as inline-images on their pages. This is not a recommended configuration, but it can work @@ -405,7 +405,7 @@ SetEnvIf Referer "^$" local_referal Deny from all Allow from env=local_referal </Directory> - +

For more information about this technique, see the ApacheToday tutorial " -- 2.50.1