Page 4 of 6

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Tue Dec 06, 2016 4:32 am
by delebash
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

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Mon Jan 16, 2017 3:58 pm
by Aidan101
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?

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Fri Feb 03, 2017 11:53 am
by arnada21
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 =)

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Sun May 21, 2017 11:17 pm
by soldx
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.

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Fri Jun 09, 2017 3:05 am
by noogen
@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)."

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Sat Sep 23, 2017 10:14 pm
by juslintek
Found this alternative:
https://medium.com/@karljohnson/nginx-m ... 28a44d1854

remove nginx then install nginx-more and copy over http://c.vestacp.com/0.9.8/rhel/7/nginx/nginx.conf (change url of config to your distro specific). And finally tweak to your liking.

P.S. nginx-more provides prebuilt nginx.conf and conf.d with example configs of ngx_pagespeed and other. They do no overwrite anything just rename old and place new instead. So you can place back old configs.

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Thu Oct 26, 2017 5:02 am
by pramathesh
I'm getting this error

make: *** No rule to make target 'install'. Stop.

Any resolutions for this?

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Thu Oct 26, 2017 7:09 am
by mehargags
pramathesh wrote:I'm getting this error
make: *** No rule to make target 'install'. Stop.
Any resolutions for this?
Give us some more info, What OS & version are you on ?
Do you have build-essentials pkg installed ? are you running make as sudo ? does ./configure give you some dependency errors ?

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Mon Nov 13, 2017 2:50 am
by StopSpazzing
I found it much easier to do it the Google Pagespeed suggested way:

Code: Select all

bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
     --nginx-version latest -a "--prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/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-compat --with-file-aio --with-threads --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_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'" -d
This code above is a -d(ry) run code; anyone could run it shows you what it WOULD do.

Get your config info and add it to:

Code: Select all

bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
     --nginx-version latest -a "add config here"
you can always add a -d to do a dry run so you can see what will happen. I rather have latest nginx and pagespeed personally, so this worked out find for me. More info here: https://www.modpagespeed.com/doc/build_ ... rom_source

Let it do all the heavy lifting.

Re: HOWTO Install ngx_pagespeed (Google PageSpeed)

Posted: Mon Nov 27, 2017 3:29 pm
by violab
I tried this one, to update nginx to the latest version compiled with ngx_pagespeed.
Unfortunately, I had issues with my ISPCONFIG installation.
Can you please provide some help for those who already have nginx & ispconfig installed?