The internal environment variables set by this directive are set
@@ -104,7 +108,9 @@ SSI pages
on to CGI scripts and SSI pages.
Example
+
UnsetEnv LD_LIBRARY_PATH
+
diff --git a/docs/manual/mod/mod_example.xml b/docs/manual/mod/mod_example.xml
index 94e3cd23be..36f66a52c7 100644
--- a/docs/manual/mod/mod_example.xml
+++ b/docs/manual/mod/mod_example.xml
@@ -99,18 +99,18 @@
To activate the example module, include a block similar to
the following in your httpd.conf
file:
-
- <Location /example-info>
- SetHandler example-handler
- </Location>
-
+
+<Location /example-info>
+ SetHandler example-handler
+</Location>
+
As an alternative, you can put the following into a .htaccess
file
and then request the file "test.example" from that location:
-
+
AddHandler example-handler .example
-
+
After reloading/restarting your server, you should be able
to browse to this location and see the brief display mentioned
diff --git a/docs/manual/mod/mod_expires.xml b/docs/manual/mod/mod_expires.xml
index 00edb03a73..40d488ab52 100644
--- a/docs/manual/mod/mod_expires.xml
+++ b/docs/manual/mod/mod_expires.xml
@@ -62,12 +62,10 @@ criteria
ExpiresByType directives
can also be defined in a more readable syntax of the form:
-
- ExpiresDefault "base [plus num type]
- [num type] ..."
- ExpiresByType type/encoding "base [plus num type]
- [num type] ..."
-
+
+ExpiresDefault "base [plus num type] [num type] ..."
+ExpiresByType type/encoding "base [plus num type] [num type] ..."
+
where base is one of:
@@ -98,21 +96,19 @@ criteria
make documents expire 1 month after being accessed, by
default:
-
- ExpiresDefault "access plus 1 month"
- ExpiresDefault "access plus 4 weeks"
- ExpiresDefault "access plus 30 days"
-
+
+ExpiresDefault "access plus 1 month"
+ExpiresDefault "access plus 4 weeks"
+ExpiresDefault "access plus 30 days"
+
The expiry time can be fine-tuned by adding several
'num type' clauses:
-
- ExpiresByType text/html "access plus 1 month 15
- days 2 hours"
- ExpiresByType image/gif "modification plus 5 hours 3
- minutes"
-
+
+ExpiresByType text/html "access plus 1 month 15 days 2 hours"
+ExpiresByType image/gif "modification plus 5 hours 3 minutes"
+
Note that if you use a modification date based setting, the
Expires header will not be added to content
@@ -193,13 +189,15 @@ by MIME type
repeatedly within a relatively short timespan).
Example:
- # enable expirations
- ExpiresActive On
- # expire GIF images after a month in the client's cache
- ExpiresByType image/gif A2592000
- # HTML documents are good for a week from the
- # time they were changed
- ExpiresByType text/html M604800
+
+# enable expirations
+ExpiresActive On
+# expire GIF images after a month in the client's cache
+ExpiresByType image/gif A2592000
+# HTML documents are good for a week from the
+# time they were changed
+ExpiresByType text/html M604800
+
Note that this directive only has effect if
diff --git a/docs/manual/mod/mod_ext_filter.xml b/docs/manual/mod/mod_ext_filter.xml
index 8a1ea12377..f663e2b4d5 100644
--- a/docs/manual/mod/mod_ext_filter.xml
+++ b/docs/manual/mod/mod_ext_filter.xml
@@ -60,30 +60,25 @@ delivery to the client
Examples
Generating HTML from some other type of response
-
- # mod_ext_filter directive to define a filter
- # to HTML-ize text/c files using the external
- # program /usr/bin/enscript, with the type of
- # the result set to text/html
- ExtFilterDefine c-to-html mode=output \
-
- intype=text/c outtype=text/html \
- cmd="/usr/bin/enscript --color -W html -Ec -o - -"
-
-
- <Directory "/export/home/trawick/apacheinst/htdocs/c">
-
- # core directive to cause the new filter to
- # be run on output
- SetOutputFilter c-to-html
-
- # mod_mime directive to set the type of .c
- # files to text/c
- AddType text/c .c
-
-
- </Directory>
-
+
+# mod_ext_filter directive to define a filter
+# to HTML-ize text/c files using the external
+# program /usr/bin/enscript, with the type of
+# the result set to text/html
+ExtFilterDefine c-to-html mode=output \
+ intype=text/c outtype=text/html \
+ cmd="/usr/bin/enscript --color -W html -Ec -o - -"
+
+<Directory "/export/home/trawick/apacheinst/htdocs/c">
+ # core directive to cause the new filter to
+ # be run on output
+ SetOutputFilter c-to-html
+
+ # mod_mime directive to set the type of .c
+ # files to text/c
+ AddType text/c .c
+</Directory>
+
Implementing a content encoding filter
@@ -91,116 +86,99 @@ delivery to the client
Please refer to mod_deflate for a practical
implementation.
-
- # mod_ext_filter directive to define the external filter
- ExtFilterDefine gzip mode=output cmd=/bin/gzip
-
- <Location /gzipped>
-
- # core directive to cause the gzip filter to be
- # run on output
- SetOutputFilter gzip
-
- # mod_header directive to add
- # "Content-Encoding: gzip" header field
- Header set Content-Encoding gzip
-
- </Location>
-
+
+# mod_ext_filter directive to define the external filter
+ExtFilterDefine gzip mode=output cmd=/bin/gzip
+
+<Location /gzipped>
+
+ # core directive to cause the gzip filter to be
+ # run on output
+ SetOutputFilter gzip
+
+ # mod_header directive to add
+ # "Content-Encoding: gzip" header field
+ Header set Content-Encoding gzip
+</Location>
+
Slowing down the server
-
- # mod_ext_filter directive to define a filter
- # which runs everything through cat; cat doesn't
- # modify anything; it just introduces extra pathlength
- # and consumes more resources
- ExtFilterDefine slowdown mode=output cmd=/bin/cat \
-
- preservescontentlength
-
-
- <Location />
-
- # core directive to cause the slowdown filter to
- # be run several times on output
- #
- SetOutputFilter slowdown;slowdown;slowdown
-
- </Location>
-
+
+# mod_ext_filter directive to define a filter
+# which runs everything through cat; cat doesn't
+# modify anything; it just introduces extra pathlength
+# and consumes more resources
+ExtFilterDefine slowdown mode=output cmd=/bin/cat \
+ preservescontentlength
+
+<Location />
+ # core directive to cause the slowdown filter to
+ # be run several times on output
+ #
+ SetOutputFilter slowdown;slowdown;slowdown
+</Location>
+
Using sed to replace text in the response
-
- # mod_ext_filter directive to define a filter which
- # replaces text in the response
- #
- ExtFilterDefine fixtext mode=output intype=text/html \
-
- cmd="/bin/sed s/verdana/arial/g"
-
-
- <Location />
-
- # core directive to cause the fixtext filter to
- # be run on output
- SetOutputFilter fixtext
-
- </Location>
-
+
+# mod_ext_filter directive to define a filter which
+# replaces text in the response
+#
+ExtFilterDefine fixtext mode=output intype=text/html \
+ cmd="/bin/sed s/verdana/arial/g"
+
+<Location />
+ # core directive to cause the fixtext filter to
+ # be run on output
+ SetOutputFilter fixtext
+</Location>
+
Tracing another filter
-
- # Trace the data read and written by mod_deflate
- # for a particular client (IP 192.168.1.31)
- # experiencing compression problems.
- # This filter will trace what goes into mod_deflate.
- ExtFilterDefine tracebefore \
-
- cmd="/bin/tracefilter.pl /tmp/tracebefore" \
- EnableEnv=trace_this_client
-
-
- # This filter will trace what goes after mod_deflate.
- # Note that without the ftype parameter, the default
- # filter type of AP_FTYPE_RESOURCE would cause the
- # filter to be placed *before* mod_deflate in the filter
- # chain. Giving it a numeric value slightly higher than
- # AP_FTYPE_CONTENT_SET will ensure that it is placed
- # after mod_deflate.
- ExtFilterDefine traceafter \
-
- cmd="/bin/tracefilter.pl /tmp/traceafter" \
- EnableEnv=trace_this_client ftype=21
-
-
- <Directory /usr/local/docs>
-
- SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
- SetOutputFilter tracebefore;deflate;traceafter
-
- </Directory>
-
+
+# Trace the data read and written by mod_deflate
+# for a particular client (IP 192.168.1.31)
+# experiencing compression problems.
+# This filter will trace what goes into mod_deflate.
+ExtFilterDefine tracebefore \
+ cmd="/bin/tracefilter.pl /tmp/tracebefore" \
+ EnableEnv=trace_this_client
+
+# This filter will trace what goes after mod_deflate.
+# Note that without the ftype parameter, the default
+# filter type of AP_FTYPE_RESOURCE would cause the
+# filter to be placed *before* mod_deflate in the filter
+# chain. Giving it a numeric value slightly higher than
+# AP_FTYPE_CONTENT_SET will ensure that it is placed
+# after mod_deflate.
+ExtFilterDefine traceafter \
+ cmd="/bin/tracefilter.pl /tmp/traceafter" \
+ EnableEnv=trace_this_client ftype=21
+
+<Directory /usr/local/docs>
+ SetEnvIf Remote_Addr 192.168.1.31 trace_this_client
+ SetOutputFilter tracebefore;deflate;traceafter
+</Directory>
+
Here is the filter which traces the data:
- #!/usr/local/bin/perl -w
- use strict;
-
- open(SAVE, ">$ARGV[0]")
-
- or die "can't open $ARGV[0]: $?";
-
-
- while (<STDIN>) {
-
- print SAVE $_;
- print $_;
-
- }
-
- close(SAVE);
+
+#!/usr/local/bin/perl -w
+use strict;
+
+open(SAVE, ">$ARGV[0]")
+ or die "can't open $ARGV[0]: $?";
+
+while (<STDIN>) {
+ print SAVE $_;
+ print $_;
+}
+
+close(SAVE);
+
@@ -326,9 +304,9 @@ delivery to the client
filter is removed and the request continues without it.
- Example
+
ExtFilterOptions LogStderr
-
+
Messages written to the filter's standard error will be stored
in the Apache error log.
diff --git a/docs/manual/mod/mod_file_cache.xml b/docs/manual/mod/mod_file_cache.xml
index d5d10c899b..aacc991655 100644
--- a/docs/manual/mod/mod_file_cache.xml
+++ b/docs/manual/mod/mod_file_cache.xml
@@ -159,7 +159,9 @@
mod_rewrite.
Example
+
MMapFile /usr/local/apache/htdocs/index.html
+
@@ -188,7 +190,9 @@
mod_rewrite.
Example
+
CacheFile /usr/local/apache/htdocs/index.html
+
diff --git a/docs/manual/mod/mod_filter.xml b/docs/manual/mod/mod_filter.xml
index 50d08c1e81..de1a723ef4 100644
--- a/docs/manual/mod/mod_filter.xml
+++ b/docs/manual/mod/mod_filter.xml
@@ -154,52 +154,50 @@
- Server side Includes (SSI)
- A simple case of replacing AddOutputFilterByType
-
- FilterDeclare SSI
- FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|"
- FilterChain SSI
-
+
+FilterDeclare SSI
+FilterProvider SSI INCLUDES "%{CONTENT_TYPE} =~ m|^text/html|"
+FilterChain SSI
+
- Server side Includes (SSI)
- The same as the above but dispatching on handler (classic
SSI behaviour; .shtml files get processed).
-
- FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'"
- FilterChain SSI
-
+
+FilterProvider SSI INCLUDES "%{HANDLER} = 'server-parsed'"
+FilterChain SSI
+
- Emulating mod_gzip with mod_deflate
- Insert INFLATE filter only if "gzip" is NOT in the
Accept-Encoding header. This filter runs with ftype CONTENT_SET.
-
- FilterDeclare gzip CONTENT_SET
- FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
- FilterChain gzip
-
+
+FilterDeclare gzip CONTENT_SET
+FilterProvider gzip inflate "%{req:Accept-Encoding} !~ /gzip/"
+FilterChain gzip
+
- Image Downsampling
- Suppose we want to downsample all web images, and have filters
for GIF, JPEG and PNG.
-
- FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'"
- FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'"
- FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'"
-
- FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|"
- FilterProtocol downsample "change=yes"
-
- FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'"
- FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'"
- FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'"
- <Location /image-filter>
-
- FilterChain unpack downsample repack
-
- </Location>
-
+
+FilterProvider unpack jpeg_unpack "%{CONTENT_TYPE} = 'image/jpeg'"
+FilterProvider unpack gif_unpack "%{CONTENT_TYPE} = 'image/gif'"
+FilterProvider unpack png_unpack "%{CONTENT_TYPE} = 'image/png'"
+
+FilterProvider downsample downsample_filter "%{CONTENT_TYPE} = m|^image/(jpeg|gif|png)|"
+FilterProtocol downsample "change=yes"
+
+FilterProvider repack jpeg_pack "%{CONTENT_TYPE} = 'image/jpeg'"
+FilterProvider repack gif_pack "%{CONTENT_TYPE} = 'image/gif'"
+FilterProvider repack png_pack "%{CONTENT_TYPE} = 'image/png'"
+<Location /image-filter>
+ FilterChain unpack downsample repack
+</Location>
+
@@ -269,9 +267,9 @@ being moved to mod_filter in version 2.3.7
text/html
or text/plain
before it is sent
to the client.
-
+
AddOutputFilterByType DEFLATE text/html text/plain
-
+
If you want the content to be processed by more than one filter, their
names have to be separated by semicolons. It's also possible to use one
@@ -283,14 +281,12 @@ being moved to mod_filter in version 2.3.7
INCLUDES
filter and then by the DEFLATE
filter.
-
- <Location /cgi-bin/>
-
- Options Includes
- AddOutputFilterByType INCLUDES;DEFLATE text/html
-
- </Location>
-
+
+<Location /cgi-bin/>
+ Options Includes
+ AddOutputFilterByType INCLUDES;DEFLATE text/html
+</Location>
+
diff --git a/docs/manual/mod/mod_headers.xml b/docs/manual/mod/mod_headers.xml
index f40bc05a2a..c8ff3bdf3f 100644
--- a/docs/manual/mod/mod_headers.xml
+++ b/docs/manual/mod/mod_headers.xml
@@ -47,10 +47,10 @@ headers
href="../sections.html#mergin">configuration sections. These
two directives have a different effect if reversed:
-
- RequestHeader append MirrorID "mirror 12"
- RequestHeader unset MirrorID
-
+
+RequestHeader append MirrorID "mirror 12"
+RequestHeader unset MirrorID
+
This way round, the MirrorID
header is not set. If
reversed, the MirrorID header is set to "mirror 12".
@@ -84,9 +84,9 @@ headers
Copy all request headers that begin with "TS" to the
response headers:
-
+
Header echo ^TS
-
+
@@ -96,9 +96,9 @@ headers
the client to intuit load on the server or in isolating
bottlenecks between the client and the server.
-
+
Header set MyHeader "%D %t"
-
+
results in this header being added to the response:
@@ -110,10 +110,9 @@ headers
Say hello to Joe
-
- Header set MyHeader "Hello Joe. It took %D microseconds \
- for Apache to serve this request."
-
+
+Header set MyHeader "Hello Joe. It took %D microseconds for Apache to serve this request."
+
results in this header being added to the response:
@@ -130,10 +129,10 @@ headers
stimulus. Note that this example requires the services of the
mod_setenvif module.
-
- SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader
- Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader
-
+
+SetEnvIf MyRequestHeader myvalue HAVE_MyRequestHeader
+Header set MyHeader "%D %t mytext" env=HAVE_MyRequestHeader
+
If the header MyRequestHeader: myvalue
is present on
the HTTP request, the response will contain the following header:
@@ -149,9 +148,9 @@ headers
description) by replacing https: with
http: in the Destination header:
-
+
RequestHeader edit Destination ^https: http: early
-
+
@@ -162,11 +161,11 @@ headers
NO_STORE
environment variables all existed for the
request):
-
- Header merge Cache-Control no-cache env=CGI
- Header merge Cache-Control no-cache env=NO_CACHE
- Header merge Cache-Control no-store env=NO_STORE
-
+
+Header merge Cache-Control no-cache env=CGI
+Header merge Cache-Control no-cache env=NO_CACHE
+Header merge Cache-Control no-store env=NO_STORE
+
then the response would contain the following header:
@@ -183,9 +182,9 @@ headers
Set a test cookie if and only if the client didn't send us a cookie
-
+
Header set Set-Cookie testcookie "expr=-z %{req:Cookie}"
-
+
diff --git a/docs/manual/mod/mod_heartbeat.xml b/docs/manual/mod/mod_heartbeat.xml
index f81df68cf0..a2180aae4c 100644
--- a/docs/manual/mod/mod_heartbeat.xml
+++ b/docs/manual/mod/mod_heartbeat.xml
@@ -54,7 +54,7 @@ of ProxyPass.
Every 1 second, this module generates a single multicast UDP
packet, containing the number of busy and idle workers. The
- packet is a simple ASCII format, similiar to GET query parameters
+ packet is a simple ASCII format, similar to GET query parameters
in HTTP.
@@ -82,9 +82,9 @@ multicast address to which mod_heartbeat will send
status information. This address will usually correspond to a configured
HeartbeatListen on a
frontend proxy system.
-
+
HeartbeatAddress 239.0.0.1:27999
-
+
diff --git a/docs/manual/mod/mod_heartmonitor.xml b/docs/manual/mod/mod_heartmonitor.xml
index 2870b1df12..b2577410d3 100644
--- a/docs/manual/mod/mod_heartmonitor.xml
+++ b/docs/manual/mod/mod_heartmonitor.xml
@@ -66,9 +66,9 @@ use mod_slotmem_shm.
module="mod_heartbeat">HeartbeatAddress on an origin server.
-
+
HeartbeatListen 239.0.0.1:27999
-
+
This module is inactive until this directive is used.