httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "--[ UxBoD ]--" <ux...@splatnix.net>
Subject [users@httpd] Help with cache tuning
Date Thu, 03 Feb 2011 20:10:04 GMT
Hello all,

I have been trying to tune my Apache vhost config and hoping for some help to critique, flame
and slap me with a wet fish for being so silly. So this is my config so far:

<VirtualHost *:80>
    ServerAdmin webmaster@somedomain.com
    DocumentRoot "/www/somedomain.com"
    <Directory /www/somedomain.com>
        AllowOverride All

       <FilesMatch "\.(jp?g|gif|png|js|css|ico)$">
           Header unset Etag
           FileETag None
           Header set Cache-control "public, max-age=604800"
       </FilesMatch>

       ExpiresActive On

       ExpiresDefault "access plus 1 month"
       ExpiresByType text/html "access plus 30 minutes"
       ExpiresByType text/css "access plus 2 weeks"
       ExpiresByType text/javascript "access plus 2 weeks"
       ExpiresByType image/png "access plus 1 month"
       ExpiresByType image/gif "access plus 1 month"
       ExpiresByType image/jpg "access plus 1 month"

    </Directory>

    ServerName www.somedomain.com
    ServerAlias somedomain.com

    AddOutputFilterByType DEFLATE text/html text/css text/xml application/x-javascript application/javascript
application/xml

    # Deactivate compression for buggy browsers
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    DeflateCompressionLevel 6

    # Set header information for proxies
    Header append Vary User-Agent

    ErrorLog "logs/www.somedomain.com-error.log"
    CustomLog "logs/www.somedomain.com-access.log" common
</VirtualHost>

When I check with Chrome or Firefox I get messages about:

"The following cacheable resources have a short freshness lifetime"
"Consider adding a "Cache-Control: public" header to the following resources"

Yet I though from the above config I had added those.  I am using mod_deflate and mod_pagespeed
which appear to be doing quite a good job but I feel my lack of Apache core workings is really
letting performance down.

Any help from the experienced community would be very much appreciated by a n00b.
-- 
Thanks, Phil

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message