Comments on How to Install nginx and google PageSpeed on Ubuntu 16.04 (Xenial Xerus)

This tutorial shows how to build a nginx .deb package for Ubuntu 16.04 from source that has Google PageSpeed module compiled in. Nginx (engine-x) is an open source and high-performance HTTP server, reverse proxy and IMAP/POP3 proxy server. The outstanding features of Nginx are stability, rich feature set, simple configuration and low resource consumption. Nginx is being used by some of the largest websites on the internet and is gaining more and more popularity in the webmaster community.

4 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Alex P

Hello and thank you very much for sharing.

I made a mistake to the default.conf file: I misunderstand your instruction and deleted it entirely. 

After apt-get remove nginx I restarted the whole process but now I do not have the sites-available and sites-enabled folders. How can I start entirely anew?

By: Petter Neumann

 I'm following this tutorial to install Nginx under ubuntu 16.04 x64 server.  The servere already has a running/installed  "nginx version: nginx/1.10.0 (Ubuntu)"  running a website.   Since I wanted to try pagespeed and also use openssl ; followed this tutorial, except for using https://github.com/pagespeed/ngx_pagespeed/archive/release-1.11.33.4-beta.zip, but I hasd to use      ' dpkg-buildpackage -b -uc -us '  , if not I got a compilation error about missing signing.

When compiling , evrything is sucessfull.  But when installing the built packages with  ' dpkg -i *.deb '  I gett the following eror:

 

root@server-1:~/new/nginx_source# pwd/root/new/nginx_sourceroot@server-1:~/new/nginx_source# dpkg -i *.deb(Leser database ... 135322 filer og kataloger er for øyeblikket installerte.)Preparing to unpack nginx_1.10.1-1~xenial_amd64.deb ...Unpacking nginx (1.10.1-1~xenial) over (1.10.0-0ubuntu0.16.04.2) ...dpkg: error processing archive nginx_1.10.1-1~xenial_amd64.deb (--install): prøver å skrive over «/usr/share/nginx/html/index.html» som også finnes i pakken nginx-common 1.10.0-0ubuntu0.16.04.2dpkg-deb: feil: subprocess lim inn was killed by signal (Røret ble brutt)Preparing to unpack nginx-dbg_1.10.1-1~xenial_amd64.deb ...Unpacking nginx-dbg (1.10.1-1~xenial) over (1.10.1-1~xenial) ...Preparing to unpack nginx-module-geoip_1.10.1-1~xenial_amd64.deb ...Unpacking nginx-module-geoip (1.10.1-1~xenial) over (1.10.1-1~xenial) ...Preparing to unpack nginx-module-image-filter_1.10.1-1~xenial_amd64.deb ...Unpacking nginx-module-image-filter (1.10.1-1~xenial) over (1.10.1-1~xenial) ...Preparing to unpack nginx-module-njs_1.10.1.0.0.20160414.1c50334fbea6-1~xenial_amd64.deb ...Unpacking nginx-module-njs (1.10.1.0.0.20160414.1c50334fbea6-1~xenial) over (1.10.1.0.0.20160414.1c50334fbea6-1~xenial) ...Preparing to unpack nginx-module-perl_1.10.1-1~xenial_amd64.deb ...Unpacking nginx-module-perl (1.10.1-1~xenial) over (1.10.1-1~xenial) ...Preparing to unpack nginx-module-xslt_1.10.1-1~xenial_amd64.deb ...Unpacking nginx-module-xslt (1.10.1-1~xenial) over (1.10.1-1~xenial) ...dpkg: dependency problems prevent configuration of nginx-dbg: nginx-dbg krever nginx (= 1.10.1-1~xenial). Men:  Versjon av nginx på systemet er 1.10.0-0ubuntu0.16.04.2.  Version of nginx on system, provided by nginx-core:amd64, is <none>.dpkg: error processing package nginx-dbg (--install): kravproblem - setter ikke opp pakkendpkg: dependency problems prevent configuration of nginx-module-geoip: nginx-module-geoip krever nginx (= 1.10.1-1~xenial). Men:  Versjon av nginx på systemet er 1.10.0-0ubuntu0.16.04.2.  Version of nginx on system, provided by nginx-core:amd64, is <none>.dpkg: error processing package nginx-module-geoip (--install): kravproblem - setter ikke opp pakkendpkg: dependency problems prevent configuration of nginx-module-image-filter: nginx-module-image-filter krever nginx (= 1.10.1-1~xenial). Men:  Versjon av nginx på systemet er 1.10.0-0ubuntu0.16.04.2.  Version of nginx on system, provided by nginx-core:amd64, is <none>.dpkg: error processing package nginx-module-image-filter (--install): kravproblem - setter ikke opp pakkendpkg: dependency problems prevent configuration of nginx-module-njs: nginx-module-njs krever nginx (= 1.10.1-1~xenial). Men:  Versjon av nginx på systemet er 1.10.0-0ubuntu0.16.04.2.  Version of nginx on system, provided by nginx-core:amd64, is <none>.dpkg: error processing package nginx-module-njs (--install): kravproblem - setter ikke opp pakkendpkg: dependency problems prevent configuration of nginx-module-perl: nginx-module-perl krever nginx (= 1.10.1-1~xenial). Men:  Versjon av nginx på systemet er 1.10.0-0ubuntu0.16.04.2.  Version of nginx on system, provided by nginx-core:amd64, is <none>.dpkg: error processing package nginx-module-perl (--install): kravproblem - setter ikke opp pakkendpkg: dependency problems prevent configuration of nginx-module-xslt: nginx-module-xslt krever nginx (= 1.10.1-1~xenial). Men:  Versjon av nginx på systemet er 1.10.0-0ubuntu0.16.04.2.  Version of nginx on system, provided by nginx-core:amd64, is <none>.dpkg: error processing package nginx-module-xslt (--install): kravproblem - setter ikke opp pakkenDet oppsto feil ved behandling av: nginx_1.10.1-1~xenial_amd64.deb nginx-dbg nginx-module-geoip nginx-module-image-filter nginx-module-njs nginx-module-perl nginx-module-xsltroot@server-1:~/new/nginx_source#

 

It seems that the error is due to the already installed nginx version.  How to aviod errors when installing on a system with exsistting nginx instalation ?   I would like to install as an "upgrade" of the exsisting standard ubuntu nginx instalation, using the ubuntu default instalation paths to avoid movingall files and configuration of the exsisting instalation  - this is a " live" web site and I want to avoid downtime.

 

 

By: AlexSr

It´s not woth it and this will cause issues in your ISP Config set up.

By: Bright Joe

I want to install Google PageSpeed on my Digital Ocean droplet, will this improve the site load time of my blog?

Thanks for the tutorial!