Re: Test Web Sites
Reply #5 –
Google pagespeed is even trickier than others.
For nginx leverage browsing caching, you can use this in your vhost:
# serve static files directly
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
access_log off;
expires 365d;
}
location ~* \.(pdf)$ {
expires 30d;
}
For those who are using ISPConfig and nginx, this can be set in nginx_vhost.conf.master in conf-custom folder, so that all sites will automatically use the same.