Question
How to install ngx_pagespeed Module in ubuntu 14.04 where nginx server is already installed?
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.
×
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
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.)
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.
@jefftk
My bad… It is modspdy and not modpagespeed 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 :)