Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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:
    58
    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:
    58
    never mind, was laking mod_deflate )))
     
  3. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    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:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    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:
    58
    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:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I am happy to see the issue is now resolved. Would you mind sharing the solution?

    Thank you.
     
  7. bou3lam

    bou3lam Active Member

    Joined:
    Sep 29, 2009
    Messages:
    36
    Likes Received:
    1
    Trophy Points:
    58
    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:
    58
    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
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,419
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Thank you for updating us with the solution.
     
Loading...

Share This Page