Speed up your sites with PageSpeed for Nginx
googledevelopers.blogspot.com
googledevelopers.blogspot.com
I have nginx set up to listen on ssl and proxy everything to my python backend in plain http (as well as serve static files)
Installing the pagespeed module (without even turning it on), caused nginx to revert to the default config (it just served the default nginx index.html and 404'd everything else) after the 3rd or 4th request.
Any ideas why this would happen?
[0426/064031:INFO:google_message_handler.cc(33)] Shutting down ngx_pagespeed root
[1] http://www.dotdeb.org/2011/12/19/nginx-1-0-11-passenger-3-0-...
It doesn't matter if the files are local or remote, ngx_pagespeed can fetch from both. Some docs on related functionality: https://developers.google.com/speed/docs/mod_pagespeed/domai...
Edit: Looking over your build files. I think I'm going to go ahead and create (or modify existing) spec files and throw together a github for an nginx RH tree. If anyone is interested in it when done, shoot me an e-mail through profile.
https://github.com/justicel/nginx-pagespeed
Pretty sure github is going to yell at me about the binary files :P
I tried the scripts verbatim on a fresh Ubuntu 13.04 VM (64bit).
edit: Your deb link at the end of the readme is broken as well.
But offloading things to CDN is actually one of the things it doesn't do. You might be thinking of the PageSpeed Service [1] which is a Google-hosted version.
Note that docs above are for mod_pagespeed (Apache), but all of the same filters are available in nginx port as well - it's the same C++ code under the hood. In a nutshell: HTML, CSS, JS, and image optimization (resizing, recompression, WebP, auto-spriting, etc...)
Configuring ngx_pagespeed: https://github.com/pagespeed/ngx_pagespeed#how-to-use
(hi!)
Seems like it would be super useful to have a command line version of this so I could take an html file, pipe it in and get out an optimized file, and then diff them so I can learn to make my pages better.
I suppose as a hack I could set up nginx with the plugin and then load each page through curl or something and diff them that way...
With a pipe, it'd need to use heuristics to figure out what kind of file it is. That could be added, probably, but it's not entirely trivial.
Additionally, you'd miss out on all the HTTP header mangling, such as cache expiry settings.
I'd love to get rid of using Sprockets and compiling assets.
ngx_pagespeed should take care of everything Sprockets does, right?
[1] http://zufallsheld.de/2013/04/26/googles-nginx-plugin-ngx_pa...