I was able to successfully add ngx_pagespeed to my Nginx server at Digital Ocean. I did an automated install and rebuilt Nginx from source with the ngx_pagespeed module per this guide: https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
The module seems to be working. for example I can see it is automatically converting my .jpg images to .webp. Also,
curl -I -p http://localhost| grep X-Page-Speed returns the expected header:
However, I’m not able to edit any options. When I try to run something like
pagespeed rewrite_images on, or even
pagespeed on, I get an error
pagespeed: command not found.
pagespeed should be the command for Nginx: https://modpagespeed.com/doc/configuration
I tried a couple of other commands:
which pagespeedreturns nothing.
As far as I know these should be returning the full path, something like