Cache: How to use mod_headers

2

I have a Nginx server in a shared environment where it is not possible to enable max-age because it is part of mod_expires , which is only available in a dedicated environment.

I was instructed by the support to use mod_headers , but I already did a search on the net and saw the Apache website but could not do it.

I tried to put in .htaccess of / and /www but there was no way. Things I've tried:

<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
ExpiresActive On
ExpiresDefault A2592000
</FilesMatch>
<FilesMatch ".(flv|swf|ico|gif|jpg|jpeg|png|js|css|txt|eot|woff|ttf|svg|JPG)$">  
Header set Cache-Control "max-age=2592000"  
</FilesMatch>  
ExpiresActive On
ExpiresByType image/gif       86400000
ExpiresByType image/png       86400000
ExpiresByType image/jpg       86400000
<IfModule mod_headers.c>
    <FilesMatch "\.(ico|jpe?g|png|gif|swf|css|js)$">
        Header set Cache-Control "max-age=604800, public"
    </FilesMatch>
</IfModule>

Can anyone help me use mod_headers ?

    
asked by anonymous 15.10.2015 / 05:24

0 answers