August 2017
Intermediate to advanced
278 pages
8h 53m
English
To test the differences with and without the module enabled, I've used a typical Bootstrap-based website which incorporates several JavaScript and Cascading Style Sheets (CSS) scripts:
To serve these files, we have a basic NGINX configuration:
server {
listen 80;
server_name pagespeed.nginxcookbook.com;
access_log /var/log/nginx/test-access.log combined;
location / {
root /var/www/test;
index index.html;
}
}
With a basic site set up, we can now enable the nginx_pagespeed module. Before we enable the module, we first need to create a directory for cache file storage. We can do this using the following command:
mkdir /var/ngx_pagespeed-cache
We also need to ensure that it's writable by NGINX, so we simply set the ownership ...
Read now
Unlock full access