martin.henits

Member
Aug 5, 2010
7
0
51
Hi all,

I have enabled mod_expires on my server and want to enable it for all of my users.
I want to have it like:

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 1 week"
</IfModule>

for some reasons I don't want to do it using .htaccess files for each user.

Can I add the code to one place so that it could be applied to all virtual hosts?
 

martin.henits

Member
Aug 5, 2010
7
0
51
no effect

I put the following lines in /usr/local/apache/cong/userdata/modexpires.cnf

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType text/xml "access plus 1 seconds"
</IfModule>

but it seems to have no effect !