HOWTO Install ngx_pagespeed (Google PageSpeed) Topic is solved

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
delebash
Posts: 22
Joined: Mon Aug 24, 2015 5:28 pm

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Postby delebash » Tue Dec 06, 2016 4:32 am

I also had a problem with nginx not starting after build
I am on ubuntu 16.04 so I am not sure if the commands are different

Test nginx after build

Code: Select all

sudo nginx -t


I get this error
NOTE: If you get error nginx: [emerg] mkdir() "/var/cache/nginx/client_temp" failed (2: No such file or directory)

Fix by creating temp directories

Code: Select all

sudo mkdir /var/cache/nginx
sudo touch /var/cache/nginx/client_temp


Re-run nginx test

Code: Select all

 sudo nginx -t


Start nginx if no more errors

Aidan101
Posts: 1
Joined: Mon Jan 16, 2017 3:48 pm

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Postby Aidan101 » Mon Jan 16, 2017 3:58 pm

BeKindRewind wrote:Hi. Getting ready to paris car service try this, but confused on your last line. How do you "rebuild web command" in the Vesta Control Panel? Did you mean restart web?

Hello,
Yes it is surely retart web!
If not then how?

arnada21
Posts: 7
Joined: Thu Jan 08, 2015 10:42 am

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Postby arnada21 » Fri Feb 03, 2017 11:53 am

Thank you for a great tutorial, just installed it on the latest version of VestaCP with the latest version of PageSpeed on Ubuntu 14.04.

Some notes from my installation

1. When you copying the output of nginx -V make sure the format is good, I had to spend a couple of hours to find that -fPIC was merged together with -D_FORTIFY_SOURCE=2-fPIC. This cost me a couple of hours =)

2. If you want to use the latest version of PageSpeed, go to:
https://github.com/pagespeed/ngx_pagespeed/releases and copy the .zip link

3. The link structure of the psol link is also new, if you want to run the lateset version of PageSpeed the link is altered with -x64, example: https://dl.google.com/dl/page-speed/pso ... x64.tar.gz

4. After Make install command, run nginx -t to verify that the installation was successful

5. When you got everything working, reboot your server and make sure everything is still working =)

soldx
Posts: 7
Joined: Tue Apr 11, 2017 9:55 am

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Postby soldx » Sun May 21, 2017 11:17 pm

Hello,
I followed the steps and the ngx_pagespeed was successfully installed.

But when I run

Code: Select all

nginx -t && nginx -s reload

I am getting some errors with unknown directives.
Example:

Code: Select all

nginx: [emerg] unknown directive "gzip" in /etc/nginx/nginx.conf:59
nginx: configuration file /etc/nginx/nginx.conf test failed


This is the output from my nginx -vV

Code: Select all

nginx version: nginx/1.10.3                                                                                             
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)                                                                     
built with OpenSSL 1.0.1e-fips 11 Feb 2013                                                                               
TLS SNI support enabled                                                                                                 
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-file-aio --with-threads --with-ipv6 --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie' --add-module=/root/ngx_pagespeed-release-1.9.32.10-beta               


I am guessing if maybe there is an error during the process, or maybe some directives are duplicated in any other places.

I appreciate any help.

Kind regards.

noogen
Posts: 38
Joined: Thu Jan 05, 2017 9:20 pm

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Postby noogen » Fri Jun 09, 2017 3:05 am

@soldx see issue here: https://github.com/pagespeed/ngx_pagespeed/issues/1180

There was a bug in 1.9.x so the last message on that thread and I quote, "ngx_pagespeed 1.9.x is no longer supported, and has unpatched security vulnerabilities. Please use the latest version (1.11)."

mariad
Posts: 28
Joined: Fri Feb 17, 2017 5:34 am

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Postby mariad » Fri Jun 16, 2017 11:54 am

What is the authentic tool to check the pagespeed? The one mentioned from github or some others as well.


Return to “Web Server”



Who is online

Users browsing this forum: No registered users and 10 guests