$ sudo a2enmod expires $ vi /etc/sites-available/mysite-ssl ... <Directory "/var/mysite">The above should result on something like the below (Note the date will always be something in the future):
... Cache-Control:max-age=2592000 ... Expires:Sun, 08 Jun 2012 21:03:23 GMT ...Needless to say the above should be enclosed in recipes. The first is just a command while the second needs to download from your repository the server vhost file and restart apache after.
Here is a POB recipe which installs and configures Google apache mod-pagespeed with the bare minimums you need to make your site faster. Of course you can run that recipe in remote servers using Remoto-IT. Here is the output associated to that recipe which BTW needs an NFS share hosting the debian binary:
To test your site is caching static content:
- Open the website from chrome
- Right click on the page and select "Inspect element"
- Go to network tab
- Hit enter in the address bar. Repeating this action should show all static content like images taking zero second to load as they are loaded from the cache
- As a reminder you can force a reloading just hitting reload (F5)