Header does not work
In the httpd.conflast lines:
ExpiresActive On
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresDefault "access plus 3 days"
</FilesMatch>
When I run YSlow, it says that all of my CSS files (and others) do not have an expiration date. CSS files are in subdirectories, but I believe that "\."should fit all files regardless of the subdirectory.
Apache is configured for virtual hosts, but the directives above are outside the vhosts section at the bottom httpd.conf.
There .confis a directive in the file for LoadModule expires_module modules/mod_expires.so.
The site is hosted on AWS, running AWS Linux and Apache2. I restarted apache before checking if it works.
In answer to your question, this works for me in my httpd.conf:
LoadModule expires_module /usr/lib/apache2/modules/mod_expires.so
ExpiresActive On
<filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
ExpiresDefault "access plus 3 days"
</filesMatch>
, :
1) , mod_expires.so - , . , , : apache2 -M.
2) , , (.. .htaccess - )
3) , LoadModule httpd.conf
4) FilesMatch , . , , , "site.com/politico" ( ico).