From 45c7b5bc133d9da7bb179574541d99680660ca86 Mon Sep 17 00:00:00 2001
From: Ken Coar type-map
; this is best done
with
in the server configuration file.
@@ -223,7 +225,9 @@ module="mod_dir">DirectoryIndex directive, if the server is trying to index a directory. If the configuration files specify -then the server will arbitrate between index.html
and index.html3
if both are present. If neither
are present, and index.cgi
is there, the server
diff --git a/docs/manual/howto/access.xml b/docs/manual/howto/access.xml
index 3353c91a2b..f2242a1915 100644
--- a/docs/manual/howto/access.xml
+++ b/docs/manual/howto/access.xml
@@ -85,7 +85,7 @@ Require ip ip.address
syntax.
You can insert not
to negate a particular requirement.
- Note, that since a not
is a negation of a value, it cannot
+ Note, that since a not
is a negation of a value, it cannot
be used by itself to allow or deny a request, as not true
does not constitute false. Thus, to deny a visit using a negation,
the block must have one element that evaluates as true or false.
@@ -101,11 +101,13 @@ Require ip ip.address
Visitors coming from that address (10.252.46.165
)
- will not be able to see the content covered by this directive. If,
- instead, you have a machine name, rather than an IP address, you
+ will not be able to see the content covered by this directive. If,
+ instead, you have a machine name, rather than an IP address, you
can use that.
And, if you'd like to block access from an entire domain, you can specify just part of an address or domain name:
@@ -203,4 +205,3 @@ RewriteRule ^/fridge - [F] - diff --git a/docs/manual/howto/auth.xml b/docs/manual/howto/auth.xml index d53846c55b..f8cd5d7530 100644 --- a/docs/manual/howto/auth.xml +++ b/docs/manual/howto/auth.xml @@ -127,7 +127,9 @@ module from each group. anOr, if you are just going to put the directives directly in your main server configuration file, you will of course need to @@ -322,7 +324,9 @@ Require group GroupName specific. Rather than creating a group file, you can just use the following directive:
-Using that rather than the Require user rbowen
line will allow anyone in that is listed in the password file,
@@ -503,12 +507,16 @@ Require group GroupName
that will be called during the authorization stage of the request
processing. For example:
where address is an IP address (or a partial IP address) or:
-where domain_name is a fully qualified domain name (or a partial domain name); you may provide multiple addresses or @@ -597,4 +605,3 @@ Require group GroupName - diff --git a/docs/manual/howto/public_html.xml b/docs/manual/howto/public_html.xml index 063501378b..e523ccc630 100644 --- a/docs/manual/howto/public_html.xml +++ b/docs/manual/howto/public_html.xml @@ -72,7 +72,9 @@ assumed to be a directory path relative to the home directory of the specified user. Given this configuration:
-the URL http://example.com/~rbowen/file.html
will be
translated to the file path
@@ -82,7 +84,9 @@
constructed using that path, plus the username specified. Given this
configuration:
the URL http://example.com/~rbowen/file.html
will be
translated to the file path /var/html/rbowen/file.html
the URL http://example.com/~rbowen/file.html
will be
translated to the file path
@@ -99,7 +105,9 @@
Multiple directories or directory paths can also be set.
-For the URL http://example.com/~rbowen/file.html
,
Apache will search for ~rbowen
. If it isn't found,
@@ -114,7 +122,9 @@
The
The above example will redirect a request for
http://example.com/~bob/abc.html
to
@@ -128,7 +138,9 @@
Using the syntax shown in the UserDir documentation, you can restrict what users are permitted to use this functionality:
-The configuration above will enable the feature for all users
except for those listed in the disabled
statement.
diff --git a/docs/manual/misc/perf-tuning.xml b/docs/manual/misc/perf-tuning.xml
index 5429f0b872..5c9cd64037 100644
--- a/docs/manual/misc/perf-tuning.xml
+++ b/docs/manual/misc/perf-tuning.xml
@@ -248,11 +248,15 @@ DocumentRoot "/www/htdocs"
penalties. There's one case where you can speed up the server.
Instead of using a wildcard such as:
Use a complete list of options:
-where you list the most common choice first.
@@ -431,10 +435,10 @@ DocumentRoot "/www/htdocs" one connection at a time. Worker generally is a good choice for high-traffic servers because it has a smaller memory footprint than the prefork MPM. - -For modules that don't implement any merging logic, such as +
For modules that don't implement any merging logic, such as
before returning the document
/usr/local/web/index.html
, the server will read
@@ -240,7 +242,9 @@ content-type is text/plain
or text/html
charset values for use in Internet media types (MIME types).
For example:
Example:
-In the example above all directives that are neither in the group
AuthConfig
nor Indexes
cause an internal
@@ -697,7 +703,9 @@ which no other media type configuration could be found.
of configuration files, it may be specified with the value
none
, meaning no default media type. For example:
DefaultType None
is only available in
httpd-2.2.7 and later.
For server configurations that are vulnerable to these problems, you should disable memory-mapping of delivered files by specifying:
-For NFS mounted files, this feature may be disabled explicitly for the offending files by specifying:
@@ -1171,7 +1181,9 @@ version 2.3.9.For server configurations that are not vulnerable to these problems, you may enable this feature by specifying:
-For network mounted files, this feature may be disabled explicitly for the offending files by specifying:
@@ -1351,13 +1363,17 @@ ErrorDocument 404 /cgi-bin/bad_urls.pl the file-path is not absolute then it is assumed to be relative to theIf the file-path
begins with a pipe character "|
" then it is assumed to be a
command to spawn to handle the error log.
See the notes on piped logs for more information.
@@ -1371,7 +1387,9 @@ ErrorDocument 404 /cgi-bin/bad_urls.pl in individual virtual hosts, the final facility specified affects the entire server. -Additional modules can provide their own ErrorLog providers. The syntax
is similar to syslog
example above.
ETag
field will be
included in the response.gif
,
you might want to use:
- Note that this directive overrides other indirect media type associations defined in mime.types or via the @@ -1953,7 +1975,9 @@ satisfied by a request at runtime directives if and only if the expression evaluates to true. For example:
-would match HTTP/1.0 requests without a Host: header.
Expressions may contain various shell-like operators for string
@@ -1962,7 +1986,9 @@ satisfied by a request at runtime
and others (-n
, -z
, -f
, ...).
It is also possible to use regular expressions,
shell-like pattern matches and many other operations. These operations
can be done on request headers (req
), environment variables
@@ -2164,12 +2190,16 @@ Include conf/vhosts/*.conf
path. This example will fail if there is no subdirectory in conf/vhosts
that contains at least one *.conf file:
Alternatively, the following command will just be ignored in case of missing files or directories:
-For a full description of how this directive is interpreted by
proxy requests, see the
For example:
-When name-based virtual hosting is used, the value for this @@ -2531,7 +2567,9 @@ client
For example:
-For example:
-Example:
-For example:
-When logging to a regular file messages of the level @@ -3085,7 +3129,9 @@ connection
For example:
-For example, if you are running https
on a non-standard port, specify the protocol explicitly:
You can also specify the protocol using the
It may be worth setting up a dedicated address for this, e.g.
-as users do not always mention that they are talking about the server!
@@ -3896,7 +3946,7 @@ to name-virtual hosts (nor for ServerName vs. ServerAlias).The complete list of names in the
The
If no
If no port is specified in the
The default location of --prefix
argument to
@@ -4162,7 +4216,9 @@ handler
of extension, you might put the following into an
.htaccess
file in that directory:
Another example: if you wanted to have the server display a status report whenever a URL of @@ -4278,7 +4334,7 @@ certain events before failing a request for an acknowledgement of a packet if the send buffer is full.
This directive controls whether HTTP trailers are copied into the - internal representation of HTTP headers. This mergeing occurs when the - request body has been completely consumed, long after most header + internal representation of HTTP headers. This mergeing occurs when the + request body has been completely consumed, long after most header processing would have a chance to examine or modify request headers.
This option is provided for compatibility with releases prior to 2.4.10, where trailers were always merged.
diff --git a/docs/manual/mod/mod_asis.xml b/docs/manual/mod/mod_asis.xml index d42f8da662..e33e8e84be 100644 --- a/docs/manual/mod/mod_asis.xml +++ b/docs/manual/mod/mod_asis.xml @@ -51,7 +51,9 @@ HTTP headersIn the server configuration file, associate files with the
send-as-is
handler e.g.
The contents of any file with a .asis
extension
will then be sent by Apache httpd to the client with almost no
diff --git a/docs/manual/mod/mod_authnz_ldap.xml b/docs/manual/mod/mod_authnz_ldap.xml
index 542094b5f6..37a3e131c6 100644
--- a/docs/manual/mod/mod_authnz_ldap.xml
+++ b/docs/manual/mod/mod_authnz_ldap.xml
@@ -566,7 +566,8 @@ Require valid-user
The next example is the same as above; but with the fields
that have useful defaults omitted. Also, note the use of a
redundant LDAP server.
-
When
This directive only has effect when this module is used for +
This directive only has effect when this module is used for authentication.
@@ -1307,7 +1312,9 @@ objects that are groups during sub-group processing. to use. The syntax of the URL isIf you want to specify more than one LDAP URL that Apache should try in turn, the syntax is:
-Caveat: If you specify multiple servers, you need to enclose the entire URL string in quotes; otherwise you will get an error: "AuthLDAPURL takes one argument, URL to define LDAP connection.." You can of course use search parameters on each of these.
diff --git a/docs/manual/mod/mod_cern_meta.xml b/docs/manual/mod/mod_cern_meta.xml index ce40d7b4eb..694b3c3115 100644 --- a/docs/manual/mod/mod_cern_meta.xml +++ b/docs/manual/mod/mod_cern_meta.xml @@ -81,12 +81,16 @@ files accessed. Set to ".
" to look in the same directory
as the file:
- Or, to set it to a subdirectory of the directory containing the files:
-Flags specified with this directive are merged with the flags - that underlying providers may have registerd with +
Flags specified with this directive are merged with the flags
+ that underlying providers may have registerd with
change=yes
, but a particular
+ the equivalent of change=yes
, but a particular
configuration of the module can override with change=no
.
change=yes|no
change=1:1
The following directive will activate files ending with
.map
as imagemap files:
Note that the following is still supported:
-However, we are trying to phase out "magic MIME types" so we are deprecating this method.
diff --git a/docs/manual/mod/mod_journald.xml b/docs/manual/mod/mod_journald.xml index e15da1db71..7133cae9da 100644 --- a/docs/manual/mod/mod_journald.xml +++ b/docs/manual/mod/mod_journald.xml @@ -75,7 +75,9 @@ if the system supports it. -Once that has been put into your httpd.conf file, any file containing
@@ -497,7 +499,7 @@ responses from the server
compress the output using
If more than one filter is specified, they must be separated
@@ -568,16 +570,16 @@ type
Or, to specify multiple file extensions in one directive:
The extension argument is case-insensitive and can
@@ -593,8 +595,8 @@ type
This is useful in situations, e.g. when a client @@ -658,7 +660,7 @@ a matching file with MultiViews files:
If you have a request for /index.php/foo.shtml
@@ -765,8 +767,8 @@ extensions
This has the effect of returning .html
files in
@@ -923,8 +925,8 @@ extensions
This will remove any special handling of .cgi
diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml
index 7a7596f798..7e97e9c358 100644
--- a/docs/manual/mod/mod_proxy.xml
+++ b/docs/manual/mod/mod_proxy.xml
@@ -451,7 +451,7 @@ ProxyPass "/examples" "http://backend.example.com/examples" timeout=10
other request headers.
Note: If you need to specify custom request headers to be
- added to the forwarded request, use the
+ added to the forwarded request, use the
example.com
through the INCLUDES
filter when they are sent through the proxy server:
- A backend URL matches the configuration section if it begins with the +
A backend URL matches the configuration section if it begins with the
the wildcard-url string, even if the last path segment in the
- directive only matches a prefix of the backend URL. For example,
- <Proxy http://example.com/foo> matches all of
- http://example.com/foo, http://example.com/foo/bar, and
+ directive only matches a prefix of the backend URL. For example,
+ <Proxy http://example.com/foo> matches all of
+ http://example.com/foo, http://example.com/foo/bar, and
http://example.com/foobar. The matching of the final URL differs
from the behavior of the
For more control over the matching, see
<Directory>
context.<Directory>
context.Suppose the local server has address http://example.com/
;
then
path
string in
internal-path, the cookie path will be replaced with
public-path.
-In the example given with
+In the example given with
Alternatively you may prefer to default everything to binary:
For example:
-loads the named module from the modules subdirectory of the @@ -179,4 +181,3 @@ of active modules - diff --git a/docs/manual/mod/mod_syslog.xml b/docs/manual/mod/mod_syslog.xml index 169e326724..183889d4ff 100644 --- a/docs/manual/mod/mod_syslog.xml +++ b/docs/manual/mod/mod_syslog.xml @@ -46,7 +46,9 @@ in individual virtual hosts, the final facility specified affects the entire server.
-Each flag (with a few exceptions) has a short form, such as
-CO
, as well as a longer form, such as cookie
.
+CO
, as well as a longer form, such as cookie
.
While it is most common to use
the short form, it is recommended that you familiarize yourself with the
long form, so that you remember what each flag is supposed to do.
@@ -68,9 +70,9 @@ of how you might use them.
The [B] flag instructs
In 2.4.10 and later, you can limit the escaping to specific characters
-in backreferences by listing them: [B=#?;]
. Note: The space
-character can be used in the list of characters to escape, but it cannot be
+
In 2.4.10 and later, you can limit the escaping to specific characters
+in backreferences by listing them: [B=#?;]
. Note: The space
+character can be used in the list of characters to escape, but it cannot be
the last character in the list.
mod_rewrite
has to unescape URLs before mapping them,
@@ -78,7 +80,9 @@ so backreferences are unescaped at the time they are applied.
Using the B flag, non-alphanumeric characters in backreferences
will be escaped. For example, consider the rule:
Given a search term of 'x & y/z', a browser will encode it as 'x%20%26%20y%2Fz', making the request 'search/x%20%26%20y%2Fz'. Without the B @@ -106,7 +110,7 @@ strings in the encoded form.
The [BNP] flag instructs
Using the [END] flag terminates not only the current round of rewrite processing (like [L]) but also prevents any subsequent rewrite processing from occurring in per-directory (htaccess) context.
@@ -290,7 +294,9 @@ allows more flexibility in assigning a Forbidden status.The following rule will forbid .exe
files from being
downloaded from your server.
This example uses the "-" syntax for the rewrite target, which means that the requested URI is not modified. There's no reason to rewrite to @@ -309,7 +315,9 @@ longer available.
As with the [F] flag, you will typically use the "-" syntax for the rewrite target when using the [G] flag:
-When using [G], an [L] is implied - that is, the response is returned immediately, and no further rules are evaluated.
@@ -321,7 +329,9 @@ immediately, and no further rules are evaluated. handler. For example, one might use this to force all files without a file extension to be parsed by the php handler: -
The regular expression above - !\.
- will match any request
@@ -405,14 +415,16 @@ certain string or letter repeatedly in a request. The example shown here
will replace A with B everywhere in a request, and will continue doing
so until there are no more As to be replaced.
You can think of this as a while
loop: While this
pattern still matches (i.e., while the URI still contains an
A
), perform this substitution (i.e., replace the
A
with a B
).
In 2.5.0 and later, this module returns an error after 10,000 iterations to -protect against unintended looping. An alternative maximum number of +protect against unintended looping. An alternative maximum number of iterations can be specified by adding to the N flag.
.jpg
and .JPG
files are both acceptable, for
example.
-
The above example will redirect /anchor/xyz
to
@@ -484,7 +500,9 @@ requests.
example, if you wanted all image requests to be handled by a back-end
image server, you might do something like the following:
Use of the [P] flag implies [L] - that is, the request is immediately pushed through the proxy, and any following rules will not be @@ -578,7 +596,9 @@ Using the [QSA] flag causes the query strings to be combined.
Consider the following rule:
-With the [QSA] flag, a request for /pages/123?one=two
will be
mapped to /page.php?page=123&one=two
. Without the [QSA]
@@ -625,7 +645,7 @@ will be used to generate the URL sent with the redirect.
Any valid HTTP response status code may be specified,
using the syntax [R=305], with a 302 status code being used by
default if none is specified. The status code specified need not
-necessarily be a redirect (3xx) status code. However,
+necessarily be a redirect (3xx) status code. However,
if a status code is outside the redirect range (300-399) then the
substitution string is dropped entirely, and rewriting is stopped as if
the L
were used.
The [S] flag is used to skip rules that you don't want to run. The -syntax of the skip flag is [S=N], where N signifies +
The [S] flag is used to skip rules that you don't want to run. The
+syntax of the skip flag is [S=N], where N signifies
the number of rules to skip (provided the goto
statement in your rewrite ruleset. In the following
+RewriteCond directives match). This can be thought of as a
+goto
statement in your rewrite ruleset. In the following
example, we only want to run the
L
flag can be useful in this context to end the
/puppies
and /canines
by the canonical /dogs
.
-Many of the solutions in this section will all use the same condition, which leaves the matched value in the %2 backreference. %1 is the beginining of the query string (up to the key of intererest), and %3 is the remainder. This -condition is a bit complex for flexibility and to avoid double '&&' in the +condition is a bit complex for flexibility and to avoid double '&&' in the substitutions.
The syntax of the RewriteMap
directive is as
follows:
The MapName is an arbitray name that you assign to the map, and which you will use in @@ -84,15 +86,21 @@ configuration.
For example, you can define a
You would then be able to use this map in a
A default value can be specified in the event that nothing is found in the map:
-@@ -139,7 +147,6 @@ may be used, and give examples of each.
Redirect a URI to an all-lowercase version of itself
.htaccess
file, you'll need to remove the leading slash from the rewrite
pattern in order for it to match anything:
- A simple example is shown here which will replace all dashes with underscores in a request URI.
- +Rewrite configuration