awsnginx

Use PageSpeed with NGINX

PageSpeed is included, but not enabled by default, in v1.14.2-2 and later of the Bitnami NGINX stack. It is not included in earlier versions.

To enable PageSpeed, add the configuration below within the server block of the /opt/bitnami/nginx/conf/bitnami/bitnami.conf file:

pagespeed on;
pagespeed FileCachePath /opt/bitnami/nginx/var/ngx_pagespeed_cache;
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; }
location ~ "^/ngx_pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }

Restart the NGINX server for your changes to take effect.

$ sudo /opt/bitnami/ctlscript.sh restart nginx
Last modification April 18, 2019