I followed the google developers website https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source but this page says that I need to install nginx from source but I already installed nginx on my droplet. Could you please guide me step by step installation on ngx_pagespeed module on ubuntu 14.04 which already has nginx webserver,php5 fastcgi???
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
This question was answered by @saurabh:
Hey. Once this is already installed, it is not possible to compile it with the module thereafter. Also hopefully you are already aware that this mod has been officially donated by Google to Apache and that is the primary reason Google offers “Build From Source” code and for Apache it is pre-built!
Yet if you want to compile it again, you only need to do this:
sudo apt-get remove --purge nginx sudo apt-get autoremove sudo apt-get autoclean
Once you have completely removed Nginx, then you will be required to follows steps as described on this page.
Hope this helps!
– Regards Saurabh
Servopia.com Managed Cloud Hosting For PHP Applications On DigitalOcean IaaS
You can see the comment here.
This question was answered by @jefftk:
Saurabh is correct: you first have to remove the nginx installed by your package manager, and then build from source following the instructions you referenced.
But I did just want to clear up a couple side things:
- Google hasn’t donated ngx_pagespeed to the Apache Foundation. Perhaps you’re thinking of mod_spdy?
- The reason we provide binary packages for Apache but not Nginx is that Apache supports loadable modules and Nginx doesn’t. If Nginx adds support for packages we’ll gladly prepare them.
(I’m a developer on PageSpeed at Google.)
You can see the comment here.
Saurabh is correct: you first have to remove the nginx installed by your package manager, and then build from source following the instructions you referenced.
But I did just want to clear up a couple side things:
(I’m a developer on PageSpeed at Google.)
Hey. Once this is already installed, it is not possible to compile it with the module thereafter. Also hopefully you are already aware that this mod has been officially donated by Google to Apache and that is the primary reason Google offers “Build From Source” code and for Apache it is pre-built!
Yet if you want to compile it again, you only need to do this:
Once you have completely removed Nginx, then you will be required to follows steps as described on this page.
Hope this helps!
– Regards Saurabh
Servopia.com Managed Cloud Hosting For PHP Applications On DigitalOcean IaaS
@jefftk
My bad… It is mod_spdy and not mod_pagespeed that I referred to :)
@rossmc
Did you check Nginx error logs?
If I may, why don’t you try Nginx as reverse proxy for Apache webserver? Then mod_pagespeed can be easily installed as a package for Apache and your purpose solved :)
I tried the approach suggested by @saurabh but NGINX is not working after removing and building from source as described by google.
when I try to restart nginx all I get is
Had to uninstall NGINX again, remove ngx-pagespeed, re-install nginx and replace /etc/nginx with a backup that I took before trying to install.