Another option is to have content cached before personalisation is applied
by mod_include (or another content processing filter). In this
example templates containing tags understood by
mod_include are cached before being parsed:
- Warning:If the location of the
CACHE filter in the filter chain is changed for any reason,
@@ -310,9 +307,9 @@
LogFormat directive as
follows:
-
+
LogFormat "%{cache-status}e ..."
-
+
Based on the caching decision made, the reason is also written to the
subprocess environment under one the following four keys, as appropriate:
@@ -329,12 +326,12 @@
This makes it possible to support conditional logging of cached requests
as per the following example:
-
- CustomLog cached-requests.log common env=cache-hit
- CustomLog uncached-requests.log common env=cache-miss
- CustomLog revalidated-requests.log common env=cache-revalidate
- CustomLog invalidated-requests.log common env=cache-invalidate
-
+
+CustomLog cached-requests.log common env=cache-hit
+CustomLog uncached-requests.log common env=cache-miss
+CustomLog revalidated-requests.log common env=cache-revalidate
+CustomLog invalidated-requests.log common env=cache-invalidate
+
For module authors, a hook called cache_status is available,
allowing modules to respond to the caching outcomes above in customised
@@ -379,37 +376,37 @@ manager
also be used to specify remote sites and proxy protocols which
caching should be enabled for.
-
- # Cache content
- <Location /foo>
-
- CacheEnable disk
-
- </Location>
- # Cache regex
- <LocationMatch foo$>
-
- CacheEnable disk
-
- </LocationMatch>
- # Cache proxied url's
- CacheEnable disk /
- # Cache FTP-proxied url's
- CacheEnable disk ftp://
- # Cache content from www.example.org
- CacheEnable disk http://www.example.org/
-
+
+# Cache content
+<Location /foo>
+ CacheEnable disk
+</Location>
+
+# Cache regex
+<LocationMatch foo$>
+ CacheEnable disk
+</LocationMatch>
+
+# Cache proxied url's
+CacheEnable disk /
+
+# Cache FTP-proxied url's
+CacheEnable disk ftp://
+
+# Cache content from www.example.org
+CacheEnable disk http://www.example.org/
+
A hostname starting with a "*" matches all hostnames with
that suffix. A hostname starting with "." matches all
hostnames containing the domain components that follow.
-
- # Match www.example.org, and fooexample.org
- CacheEnable disk http://*example.org/
- # Match www.example.org, but not fooexample.org
- CacheEnable disk http://.example.org/
-
+
+# Match www.example.org, and fooexample.org
+CacheEnable disk http://*example.org/
+# Match www.example.org, but not fooexample.org
+CacheEnable disk http://.example.org/
+
The no-cache
environment variable can be set to
disable caching on a finer grained set of resources in versions
@@ -433,7 +430,9 @@ manager
url-string.
Example
+
CacheDisable /local_files
+
If used in a Location directive,
@@ -441,11 +440,11 @@ manager
is used, caching for the whole location will be disabled.
Example
- <Location /foo>
-
- CacheDisable on
-
- </Location>
+
+<Location /foo>
+ CacheDisable on
+</Location>
+
The no-cache
environment variable can be set to
@@ -472,9 +471,9 @@ manager
server. Thus, documents will be out of date at most this number of seconds. This maximum
value is enforced even if an expiry date was supplied with the document.
-
+
CacheMaxExpire 604800
-
+
@@ -495,9 +494,9 @@ manager
server. This is only used if no valid expire time was supplied with the document.
-
+
CacheMinExpire 3600
-
+
@@ -518,9 +517,9 @@ manager
with the document. The value specified with the CacheMaxExpire
directive does not override this setting.
-
+
CacheDefaultExpire 86400
-
+
@@ -548,9 +547,9 @@ header.
CacheDefaultExpire directive will be used to
generate an expiration date.
-
+
CacheIgnoreNoLastMod On
-
+
@@ -571,9 +570,9 @@ header.
if the request contains no-cache header values. Resources requiring
authorization will never be cached.
-
+
CacheIgnoreCacheControl On
-
+
Warning:
This directive will allow serving from the cache even if the client has
@@ -603,9 +602,9 @@ header.
view the request is treated as if having no query string when this
directive is enabled.
-
+
CacheIgnoreQueryString On
-
+
@@ -642,9 +641,9 @@ LastModified date.
CacheMaxExpire, then the latter takes
precedence.
-
+
CacheLastModifiedFactor 0.5
-
+
@@ -685,11 +684,15 @@ LastModified date.
None
.
Example 1
+
CacheIgnoreHeaders Set-Cookie
+
Example 2
+
CacheIgnoreHeaders None
+
Warning:
@@ -728,11 +731,15 @@ LastModified date.
identifiers. Otherwise, each identifier is added to the list.
Example 1
+
CacheIgnoreURLSessionIdentifiers jsessionid
+
Example 2
+
CacheIgnoreURLSessionIdentifiers None
+
@@ -759,9 +766,9 @@ LastModified date.
the origin server, and the response may be fulfilled from cache
if the backend resource has not changed.
-
+
CacheStoreExpired On
-
+
@@ -785,9 +792,9 @@ LastModified date.
private header values. Resources requiring authorization will
never be cached.
-
+
CacheStorePrivate On
-
+
Warning:
This directive will allow caching even if the upstream server has
@@ -819,9 +826,9 @@ LastModified date.
no-store header values. Resources requiring authorization will
never be cached.
-
+
CacheStoreNoStore On
-
+
Warning:
As described in RFC 2616, the no-store directive is intended to
@@ -850,10 +857,10 @@ LastModified date.
In a minimal configuration the following directive is all that is needed to
enable the thundering herd lock in the default system temp directory.
-
- # Enable cache lock
- CacheLock on
-
+
+# Enable cache lock
+CacheLock on
+
@@ -920,21 +927,21 @@ LastModified date.
slower than the default, it allows the cache to be used in cases where full
processing is required, such as when content is subject to authorisation.
-
- # Run cache as a normal handler
- CacheQuickHandler off
-
+
+# Run cache as a normal handler
+CacheQuickHandler off
+
It is also possible, when the quick handler is disabled, for the
administrator to choose the precise location within the filter chain where
caching is to be performed, by adding the CACHE filter to
the chain.
-
- # Cache content before mod_include and mod_deflate
- CacheQuickHandler off
- AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
-
+
+# Cache content before mod_include and mod_deflate
+CacheQuickHandler off
+AddOutputFilterByType CACHE;INCLUDES;DEFLATE text/html
+
If the CACHE filter is specified more than once, the last instance will
apply.
@@ -972,14 +979,14 @@ LastModified date.
server and was not served from cache.
-
- # Enable the X-Cache header
- CacheHeader on
-
+
+# Enable the X-Cache header
+CacheHeader on
+
-
- X-Cache: HIT from localhost
-
+
+ X-Cache: HIT from localhost
+
@@ -1012,10 +1019,10 @@ LastModified date.
is used, this directive must appear within a server or virtual host context, otherwise
the setting will be ignored.
-
- # Enable the X-Cache-Detail header
- CacheDetailHeader on
-
+
+# Enable the X-Cache-Detail header
+CacheDetailHeader on
+
X-Cache-Detail: "conditional cache hit: entity refreshed" from localhost
@@ -1043,10 +1050,10 @@ LastModified date.
should be cached beneath the same cache key, a new base URL can be specified
with this directive.
-
- # Override the base URL of the cache key.
- CacheKeyBaseURL http://www.example.com/
-
+
+# Override the base URL of the cache key.
+CacheKeyBaseURL http://www.example.com/
+
Take care when setting this directive. If two separate virtual
hosts are accidentally given the same base URL, entries from one virtual host
@@ -1075,10 +1082,10 @@ LastModified date.
and the raw 5xx responses returned to the client on request, the 5xx response so
returned to the client will not invalidate the content in the cache.
-
- # Serve stale data on error.
- CacheStaleOnError on
-
+
+# Serve stale data on error.
+CacheStaleOnError on
+
diff --git a/docs/manual/mod/mod_cache_disk.xml b/docs/manual/mod/mod_cache_disk.xml
index 67c84e9d439..69a65e724da 100644
--- a/docs/manual/mod/mod_cache_disk.xml
+++ b/docs/manual/mod/mod_cache_disk.xml
@@ -89,9 +89,9 @@ stored
module="mod_cache_disk">CacheDirLength directives define
the structure of the directories under the specified root directory.
-
+
CacheRoot c:/cacheroot
-
+
@@ -167,9 +167,9 @@ cache
minimum size, in bytes, for a document to be considered for storage
in the cache.
-
+
CacheMinFileSize 64
-
+
@@ -190,9 +190,9 @@ cache
maximum size, in bytes, for a document to be considered for storage in
the cache.
-
+
CacheMaxFileSize 64000
-
+
@@ -220,9 +220,9 @@ cache
This directive only takes effect when the data is being saved to the
cache, as opposed to data being served from the cache.
-
+
CacheReadSize 102400
-
+
@@ -254,9 +254,9 @@ cache
ensure that the server does not buffer excessively should data arrive faster
than expected.
-
+
CacheReadTime 1000
-
+
diff --git a/docs/manual/mod/mod_cache_socache.xml b/docs/manual/mod/mod_cache_socache.xml
index ff04e7d61eb..efa349a48f5 100644
--- a/docs/manual/mod/mod_cache_socache.xml
+++ b/docs/manual/mod/mod_cache_socache.xml
@@ -42,26 +42,22 @@ HTTP caching filter.
however the caching of partial content is not yet supported by this
module.
-
- # Turn on caching
- CacheSocache shmcb
- CacheSocacheMaxSize 102400
- <Location /foo>
-
- CacheEnable socache
-
- </Location>
-
- # Fall back to the disk cache
- CacheSocache shmcb
- CacheSocacheMaxSize 102400
- <Location /foo>
-
- CacheEnable socache
- CacheEnable disk
-
- </Location>
-
+
+# Turn on caching
+CacheSocache shmcb
+CacheSocacheMaxSize 102400
+<Location /foo>
+ CacheEnable socache
+</Location>
+
+# Fall back to the disk cache
+CacheSocache shmcb
+CacheSocacheMaxSize 102400
+<Location /foo>
+ CacheEnable socache
+ CacheEnable disk
+</Location>
+
Note:
mod_cache_socache requires the services of
@@ -89,9 +85,9 @@ stored
implementations of shared object caches are available to choose
from.
-
+
CacheSocache shmcb
-
+
@@ -114,9 +110,9 @@ cache
the cache. This value overrides the freshness lifetime defined for the
document by the HTTP protocol.
-
+
CacheSocacheMaxTime 86400
-
+
@@ -140,9 +136,9 @@ cache
only stored for its freshness lifetime, there will be no opportunity to
revalidate the response to make it fresh again.
-
+
CacheSocacheMinTime 600
-
+
@@ -172,9 +168,9 @@ cache
responses larger than those cacheable within
mod_cache_socache.
-
+
CacheSocacheMaxSize 102400
-
+
@@ -203,9 +199,9 @@ cache
This directive only takes effect when the data is being saved to the
cache, as opposed to data being served from the cache.
-
+
CacheReadSize 102400
-
+
@@ -238,9 +234,9 @@ cache
to ensure that the server does not buffer excessively should data arrive faster
than expected.
-
+
CacheSocacheReadTime 1000
-
+
diff --git a/docs/manual/mod/mod_cern_meta.xml b/docs/manual/mod/mod_cern_meta.xml
index 89a956ac2f2..e25f75782bd 100644
--- a/docs/manual/mod/mod_cern_meta.xml
+++ b/docs/manual/mod/mod_cern_meta.xml
@@ -81,12 +81,12 @@ files
accessed. Set to ".
" to look in the same directory
as the file:
- MetaDir .
+ MetaDir .
Or, to set it to a subdirectory of the directory containing the
files:
- MetaDir .meta
+ MetaDir .meta
diff --git a/docs/manual/mod/mod_cgi.xml b/docs/manual/mod/mod_cgi.xml
index 3a256010d5c..b459c48bb6d 100644
--- a/docs/manual/mod/mod_cgi.xml
+++ b/docs/manual/mod/mod_cgi.xml
@@ -168,7 +168,9 @@
Example
+
ScriptLog logs/cgi_log
+
This log will be opened as the user the child processes run
diff --git a/docs/manual/mod/mod_cgid.xml b/docs/manual/mod/mod_cgid.xml
index 01e660dd2ff..75c5be58f3a 100644
--- a/docs/manual/mod/mod_cgid.xml
+++ b/docs/manual/mod/mod_cgid.xml
@@ -90,7 +90,9 @@ the cgi daemon
write in the directory where the socket is located.
Example
+
ScriptSock /var/run/cgid.sock
+
diff --git a/docs/manual/mod/mod_charset_lite.xml b/docs/manual/mod/mod_charset_lite.xml
index 0fdcf1bc0c1..31516532e2d 100644
--- a/docs/manual/mod/mod_charset_lite.xml
+++ b/docs/manual/mod/mod_charset_lite.xml
@@ -102,12 +102,12 @@
supported by iconv.
Example
- <Directory /export/home/trawick/apacheinst/htdocs/convert>
-
- CharsetSourceEnc UTF-16BE
- CharsetDefault ISO-8859-1
-
- </Directory>
+
+<Directory /export/home/trawick/apacheinst/htdocs/convert>
+ CharsetSourceEnc UTF-16BE
+ CharsetDefault ISO-8859-1
+</Directory>
+
The character set names in this example work with the iconv
@@ -143,12 +143,12 @@
supported by iconv.
Example
- <Directory /export/home/trawick/apacheinst/htdocs/convert>
-
- CharsetSourceEnc UTF-16BE
- CharsetDefault ISO-8859-1
-
- </Directory>
+
+<Directory /export/home/trawick/apacheinst/htdocs/convert>
+ CharsetSourceEnc UTF-16BE
+ CharsetDefault ISO-8859-1
+</Directory>
+