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.

Easyapache4 - mod_ruid2 - mod_expires

Discussion in 'EasyApache' started by Emerson Bierhals, Mar 20, 2017 at 3:34 PM.

Tags:
  1. Emerson Bierhals

    Emerson Bierhals Registered

    Joined:
    Monday
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Hello,

    After migrating from EA3 to EA4, I noticed that mod_expire is not working properly.

    I'm using:
    Apache 2.4
    Mod_Ruid2
    PHP54

    I ran the test on the link PageSpeed Insights developers.google.com/speed/pagespeed/insights/ and now it appears as not being using the cache The browser. can you help me?

    Code:
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    FileETag None
    <IfModule mod_expires.c>
     ExpiresActive on
     ExpiresDefault "access plus 1 month"
     ExpiresByType text/cache-manifest "access plus 0 seconds"
     # Html
     ExpiresByType text/html "access plus 0 seconds"
     # Data
     ExpiresByType text/xml "access plus 0 seconds"
     ExpiresByType application/xml "access plus 0 seconds"
     ExpiresByType application/json "access plus 0 seconds"
     # Feed
     ExpiresByType application/rss+xml "access plus 1 hour"
     ExpiresByType application/atom+xml "access plus 1 hour"
     # Favicon
     ExpiresByType image/x-icon "access plus 1 week"
     # Media: images, video, audio
     ExpiresByType image/gif "access plus 1 month"
     ExpiresByType image/png "access plus 1 month"
     ExpiresByType image/jpg "access plus 1 month"
     ExpiresByType image/jpeg "access plus 1 month"
     ExpiresByType video/ogg "access plus 1 month"
     ExpiresByType audio/ogg "access plus 1 month"
     ExpiresByType video/mp4 "access plus 1 month"
     ExpiresByType video/webm "access plus 1 month"
     # HTC files
     ExpiresByType text/x-component "access plus 1 month"
     # Webfonts
     ExpiresByType application/x-font-ttf "access plus 1 month"
     ExpiresByType font/opentype "access plus 1 month"
     ExpiresByType application/x-font-woff "access plus 1 month"
     ExpiresByType image/svg+xml "access plus 1 month"
     ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
     # CSS / JS
     ExpiresByType text/css "access plus 1 year"
     ExpiresByType application/javascript "access plus 1 year"
     ExpiresByType application/x-javascript  "access plus 1 year"
    </IfModule>
    #Força o IE a sempre carregar utilizando a última versão disponível
    <IfModule mod_headers.c>
      Header set X-UA-Compatible "IE=Edge,chrome=1"
      <FilesMatch "\.(js|css|gif|png|jpeg|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
        Header unset X-UA-Compatible
      </FilesMatch>
    </IfModule>
    
     
    #1 Emerson Bierhals, Mar 20, 2017 at 3:34 PM
    Last edited by a moderator: Mar 20, 2017 at 3:41 PM
  2. Pankaj K

    Pankaj K Member

    Joined:
    Mar 13, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Have you tried switching handler to suPHP and tested then ?
     
  3. Emerson Bierhals

    Emerson Bierhals Registered

    Joined:
    Monday
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    The problem also happens using suPHP.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    33,397
    Likes Received:
    922
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Are you using PHP-FPM for the affected domain name? If not, feel free to open a support ticket using the link in my signature so we can take a closer look. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. Emerson Bierhals

    Emerson Bierhals Registered

    Joined:
    Monday
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brasil
    cPanel Access Level:
    Root Administrator
    Hello,

    I changed it to PHP-FPM and the problem continues.

    Support Request ID is: 8326945
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    33,397
    Likes Received:
    922
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, it was determined the issue was the result of a Mod_Rewrite rule that was redirecting objects such as images through a PHP file.

    Thank you.
     
Loading...

Share This Page