From: Joshua Slive Date: Sun, 10 Mar 2002 19:37:12 +0000 (+0000) Subject: Somehow I missed mod_expires in the xmlization. Here it is. X-Git-Tag: CHANGES~149 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=951104c79b38a0dc7c3a6dc1db209d93d039cb5f;p=apache Somehow I missed mod_expires in the xmlization. Here it is. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93831 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/allmodules.xml b/docs/manual/mod/allmodules.xml index 912eae9fa6..8bdd9b98d6 100644 --- a/docs/manual/mod/allmodules.xml +++ b/docs/manual/mod/allmodules.xml @@ -18,6 +18,7 @@ mod_dir.xml mod_env.xml mod_example.xml +mod_expires.xml mod_ext_filter.xml mod_file_cache.xml mod_headers.xml diff --git a/docs/manual/mod/directives.html b/docs/manual/mod/directives.html index 2a92657d0e..b8b2888a4e 100644 --- a/docs/manual/mod/directives.html +++ b/docs/manual/mod/directives.html @@ -3,4 +3,4 @@ distribution is listed here. They are described using a consistent format, and there is a dictionary of the terms used in their descriptions available.

-

Apache HTTP Server Version 2.0

IndexHome \ No newline at end of file +

Apache HTTP Server Version 2.0

IndexHome \ No newline at end of file diff --git a/docs/manual/mod/index.html b/docs/manual/mod/index.html index 6e417fd08c..5f917e84dd 100644 --- a/docs/manual/mod/index.html +++ b/docs/manual/mod/index.html @@ -26,7 +26,9 @@ HTTP headers
mod_auth
(WebDAV) functionality
mod_deflate
Compress content before it is delivered to the client
mod_dir
Provides for "trailing slash" redirects and serving directory index files
mod_env
Modifies the environment which is - passed to CGI scripts and SSI pages
mod_example
Illustrates the Apache module API
mod_ext_filter
Pass the response body + passed to CGI scripts and SSI pages
mod_example
Illustrates the Apache module API
mod_expires
Generation of + Expires HTTP headers according to user-specified + criteria
mod_ext_filter
Pass the response body through an external program before delivery to the client
mod_file_cache
Caches a static list of files in memory
mod_headers
Customization of HTTP request and response headers
mod_imap
Server-side imagemap processing
mod_include
Server-parsed html documents (Server Side Includes)
mod_info
Provides a comprehensive overview of the server diff --git a/docs/manual/mod/mod_expires.html b/docs/manual/mod/mod_expires.html index bae83e9873..d1f63c282f 100644 --- a/docs/manual/mod/mod_expires.html +++ b/docs/manual/mod/mod_expires.html @@ -1,38 +1,10 @@ - - - - - - - Apache module mod_expires - - - - - - -

Module mod_expires

- -

This module provides for the generation of +mod_expires - Apache HTTP Server

[APACHE DOCUMENTATION]

Apache HTTP Server Version 2.0

Apache Module mod_expires

Description:Generation of Expires HTTP headers according to user-specified - criteria.

- -

Status: Extension
- Source File: - mod_expires.c
- Module Identifier: - expires_module
- Compatibility: Available in - Apache 1.2 and later.

- -

Summary

- + criteria
Status:Extension
Module Identifier:expires_module

Summary

This module controls the setting of the Expires HTTP header in server responses. The expiration date can set to be relative to either the time the source file was last @@ -44,106 +16,76 @@ from the source until this time has passed. After that, the cache copy is considered "expired" and invalid, and a new copy must be obtained from the source.

- -

Directives

- - - -

Alternate Interval +

Directives

Alternate Interval Syntax

-

The ExpiresDefault and ExpiresByType directives +

The ExpiresDefault and + ExpiresByType directives can also be defined in a more readable syntax of the form:

-
-
ExpiresDefault "<base> [plus] {<num> - <type>}*"
+
+ ExpiresDefault "<base> [plus] {<num> + <type>}*"
ExpiresByType type/encoding "<base> [plus] - {<num> <type>}*"
- + {<num> <type>}*" +

where <base> is one of:

    -
  • access
  • +
  • access
  • -
  • now (equivalent to - 'access')
  • +
  • now (equivalent to + 'access')
  • -
  • modification
  • +
  • modification
-

The 'plus' keyword is optional. <num> - should be an integer value [acceptable to atoi()], +

The 'plus' keyword is optional. <num> + should be an integer value [acceptable to atoi()], and <type> is one of:

    -
  • years
  • +
  • years
  • -
  • months
  • +
  • months
  • -
  • weeks
  • +
  • weeks
  • -
  • days
  • +
  • days
  • -
  • hours
  • +
  • hours
  • -
  • minutes
  • +
  • minutes
  • -
  • seconds
  • +
  • seconds

For example, any of the following directives can be used to 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 text/html "access plus 1 month 15 + days 2 hours"
ExpiresByType image/gif "modification plus 5 hours 3 - minutes"
- + minutes" +

Note that if you use a modification date based setting, the Expires header will not be added to content that does not come from a file on disk. This is due to the fact that there is no modification time for such content.

-
- -

ExpiresActive - directive

- - -

Syntax: ExpiresActive - on|off
- Context: server config, virtual - host, directory, .htaccess
- Override: Indexes
- Status: Extension
- Module: mod_expires

- +

ExpiresActive Directive

Description: Enables generation of Expires headers
Syntax:ExpiresActive On|Off
Context:server config, virtual host, directory, .htaccess
Override:Indexes
Status:Extension
Module:mod_expires

This directive enables or disables the generation of the Expires header for the document realm in question. (That is, if found in an .htaccess file, for @@ -153,34 +95,18 @@ in the realm (unless overridden at a lower level, such as an .htaccess file overriding a server config file). If set to On, the header will be added to - served documents according to the criteria defined by the ExpiresByType and ExpiresDefault directives + served documents according to the criteria defined by the + ExpiresByType and + ExpiresDefault directives (q.v.).

Note that this directive does not guarantee that an Expires header will be generated. If the criteria aren't met, no header will be sent, and the effect will be as though this directive wasn't even specified.

-
- -

ExpiresByType - directive

- - -

Syntax: ExpiresByType - MIME-type <code>seconds
- Context: server config, virtual - host, directory, .htaccess
- Override: Indexes
- Status: Extension
- Module: mod_expires

- +

ExpiresByType Directive

Description: Value of the Expires header configured +by MIME type
Syntax:ExpiresByType + MIME-type <code>seconds
Context:server config, virtual host, directory, .htaccess
Override:Indexes
Status:Extension
Module:mod_expires

This directive defines the value of the Expires header generated for documents of the specified type (e.g., text/html). The second argument @@ -206,55 +132,29 @@ repeatedly within a relatively short timespan).

Example:

-
-   ExpiresActive On                  # enable expirations
-   ExpiresByType image/gif A2592000  # expire GIF images after a month
-                                     #  in the client's cache
-   ExpiresByType text/html M604800   # HTML documents are good for a
-                                     #  week from the time they were
-                                     #  changed, period
- 
-
-
-
- +
+# 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 ExpiresActive On has been specified. It overrides, for the specified MIME type only, any expiration date - set by the ExpiresDefault + set by the ExpiresDefault directive.

You can also specify the expiration time calculation using - an alternate syntax, described later in + an alternate syntax, described earlier in this document.

-
- -

ExpiresDefault - directive

- - -

Syntax: ExpiresDefault - <code>seconds
- Context: server config, virtual - host, directory, .htaccess
- Override: Indexes
- Status: Extension
- Module: mod_expires

- -

This directive sets the default algorithm for calculating - the expiration time for all documents in the affected realm. It - can be overridden on a type-by-type basis by the ExpiresByType directive. See the - description of that directive for details about the syntax of - the argument, and the alternate syntax +


ExpiresDefault Directive

Description: Default algorithm for calculating expiration time
Syntax:ExpiresDefault <code>seconds
Context:server config, virtual host, directory, .htaccess
Override:Indexes
Status:Extension
Module:mod_expires
+

This directive sets the default algorithm for calculating the + expiration time for all documents in the affected realm. It can be + overridden on a type-by-type basis by the ExpiresByType directive. See the + description of that directive for details about the syntax of the + argument, and the alternate syntax description as well.

- - - - +

Apache HTTP Server Version 2.0

IndexHome
\ No newline at end of file diff --git a/docs/manual/mod/mod_expires.xml b/docs/manual/mod/mod_expires.xml new file mode 100644 index 0000000000..90ddbe3a7e --- /dev/null +++ b/docs/manual/mod/mod_expires.xml @@ -0,0 +1,208 @@ + + + + + +mod_expires +Generation of + Expires HTTP headers according to user-specified + criteria +Extension +mod_expires.c +expires_module + + +

This module controls the setting of the Expires + HTTP header in server responses. The expiration date can set to + be relative to either the time the source file was last + modified, or to the time of the client access.

+ +

The Expires HTTP header is an instruction to + the client about the document's validity and persistence. If + cached, the document may be fetched from the cache rather than + from the source until this time has passed. After that, the + cache copy is considered "expired" and invalid, and a new copy + must be obtained from the source.

+
+ +
Alternate Interval + Syntax + +

The ExpiresDefault and + ExpiresByType directives + can also be defined in a more readable syntax of the form:

+ + + ExpiresDefault "<base> [plus] {<num> + <type>}*"
+ ExpiresByType type/encoding "<base> [plus] + {<num> <type>}*" +
+ +

where <base> is one of:

+ +
    +
  • access
  • + +
  • now (equivalent to + 'access')
  • + +
  • modification
  • +
+ +

The 'plus' keyword is optional. <num> + should be an integer value [acceptable to atoi()], + and <type> is one of:

+ +
    +
  • years
  • + +
  • months
  • + +
  • weeks
  • + +
  • days
  • + +
  • hours
  • + +
  • minutes
  • + +
  • seconds
  • +
+ +

For example, any of the following directives can be used to + 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" +
+ +

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" +
+ +

Note that if you use a modification date based setting, the + Expires header will not be added to content + that does not come from a file on disk. This is due to the fact + that there is no modification time for such content.

+
+ + +ExpiresActive +Enables generation of Expires headers +ExpiresActive On|Off +server config +virtual hostdirectory +.htaccess +Indexes + + +

This directive enables or disables the generation of the + Expires header for the document realm in question. + (That is, if found in an .htaccess file, for + instance, it applies only to documents generated from that + directory.) If set to Off, no + Expires header will be generated for any document + in the realm (unless overridden at a lower level, such as an + .htaccess file overriding a server config file). + If set to On, the header will be added to + served documents according to the criteria defined by the + ExpiresByType and + ExpiresDefault directives + (q.v.).

+ +

Note that this directive does not guarantee that an + Expires header will be generated. If the criteria + aren't met, no header will be sent, and the effect will be as + though this directive wasn't even specified.

+
+
+ + +ExpiresByType +Value of the Expires header configured +by MIME type +ExpiresByType + MIME-type <code>seconds +server config +virtual hostdirectory +.htaccess +Indexes + + +

This directive defines the value of the Expires + header generated for documents of the specified type + (e.g., text/html). The second argument + sets the number of seconds that will be added to a base time to + construct the expiration date.

+ +

The base time is either the last modification time of the + file, or the time of the client's access to the document. Which + should be used is specified by the + <code> field; M + means that the file's last modification time should be used as + the base time, and A means the client's access + time should be used.

+ +

The difference in effect is subtle. If M is used, + all current copies of the document in all caches will expire at + the same time, which can be good for something like a weekly + notice that's always found at the same URL. If A is + used, the date of expiration is different for each client; this + can be good for image files that don't change very often, + particularly for a set of related documents that all refer to + the same images (i.e., the images will be accessed + 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 +
+ +

Note that this directive only has effect if + ExpiresActive On has been specified. It overrides, + for the specified MIME type only, any expiration date + set by the ExpiresDefault + directive.

+ +

You can also specify the expiration time calculation using + an alternate syntax, described earlier in + this document.

+
+
+ + +ExpiresDefault +Default algorithm for calculating expiration time +ExpiresDefault <code>seconds +server config +virtual hostdirectory +.htaccess +Indexes + + +

This directive sets the default algorithm for calculating the + expiration time for all documents in the affected realm. It can be + overridden on a type-by-type basis by the ExpiresByType directive. See the + description of that directive for details about the syntax of the + argument, and the alternate syntax + description as well.

+
+
+
+