The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Leverage browser caching directly into Pre VirtualHost

Discussion in 'Workarounds and Optimization' started by bou3lam, May 30, 2015.

  1. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    8
    hi
    i have added the following rules:
    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/html "access 1 month"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 1 month"
    </IfModule>
    directly into Pre VirtualHost Include in apache configuration via whm, so the effect will be global into all account, it was some 20 minutes ago, does the effect take time ? because pagespeed insights still still showing the Leverage browser caching problem, im under cdn and i deleted the cache from the cdn to store new one
     
    thuminh likes this.
  2. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    8
    never mind, was laking mod_deflate )))
     
  3. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    8
    got in troubles now, i installed mod_deflate through easyapache, went to httpd.conf and searched for it, and it was not present , neither mod_expires. so added them manually now i cant create the file deflate.conf ! can someone help what to
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,814
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    You should not have to manually load the modules if you installed them through EasyApache. Were they visible with the "httpd -M" command?

    Thank you.
     
  5. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    8
    hi thanks for the reply, the problem has been solved through your exellent support staff members, thanks a lot
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,814
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    8
    well all the info in the in the web concening leverage cachging under cpanel are expired, installation and configuration are now else, since im under cdn (cloudflare), i just had to activate this under the cdn options
     
  8. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    8
    under cpanel if you use no cdn or anything else (nginx for example) , you have to install mod_expires and mod_deflate and add the rules through : Pre VirtualHost Include in apache configuration via whm
     

Share This Page