httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] mod_expires in Apache 2.0.54
Date Thu, 17 Apr 2008 16:21:36 GMT
On Thu, Apr 17, 2008 at 12:14 PM, Karthick P
<pkarthick@premiertechnologygroup.com> wrote:
>
>
>
>
> Hello everyone,
>
>
>
> We have been using Apache 2.0.54 on SLES as our hosting standard for all our
> applications. We have enabled the mod_expires in apache to set the
> expiration settings for the static content like JPEG, GIF, JS, etc. There is
> a requirement that the expiration settings should be set at the directory
> level. Currently, it is set based on the file extension (or MIME).
>
>
>
> E.G. /directory1/*.js -> expires after 5 hours while the /directory2/*.js
> expires after 30 days.
>
>
>
> I have read the apache docs for mod_expires, it does not have any info on
> this. If anyone has any idea on this, please share.

The docs note that these directives are valid in "directory" context,
which means they can be placed in <Directory>/<Files>/<Location>
sections. See:
http://httpd.apache.org/docs/2.2/sections.html

So for example, you can do
<Directory /full/path/to/directory1>
ExpiresByType whatever/whatever "access plus 5 hours"
</Directory>
<Directory /full/path/to/directory2>
ExpiresByType whatever/whatever "access plus 30 days"
</Directory>

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message