Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Aug 2010
    Posts
    7

    Default mod_expires for all

    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?

  2. #2
    Member
    Join Date
    Aug 2010
    Posts
    7

    Default 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 !

  3. #3
    Member
    Join Date
    Aug 2010
    Posts
    7

    Default solved

    ahh a silly mistake!

    the file extension should be .conf

Similar Threads & Tags
Similar threads

  1. How to install mod_expires
    By mark1hos in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-16-2005, 05:03 PM
  2. problems with mod_expires
    By Cloak in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-02-2003, 04:13 PM
  3. mod_expires and mod_headers
    By speckados in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-13-2003, 04:06 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube