PageSpeed^1 speeds up your site and reduces page load time. This open-source webserver module automatically applies web performance best practices to pages and associated assets (CSS, JavaScript, images) without requiring that you modify your existing content or workflow.
Installation
As Wheezy has an outdated version of Nginx, we're going to use Nginx extras package with PageSpeed built-in. To get it, we will use the well-known DotDeb repository.
To install DotDeb repository, add a preference file to avoid unwanted override packages:
And reload Nginx for changes to take effect. You can also enable pagespeed on the server side directly to apply the configuration to all vhosts at once.
File path cache optimization
The file path cache is used to store rewritten elements. So it's preferable to have good performance on it, and to achieve this, you can use a tmpfs. Add this line to your fstab: