We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on Vesta 2.0 and expect to release it by the end of 2024. Read more about it: https://vestacp.com/docs/vesta-2-development
HOWTO Install ngx_pagespeed (Google PageSpeed)
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
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
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
Re-run nginx test
Start nginx if no more errors
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
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
Code: Select all
sudo nginx -t
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
Hello,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?
Yes it is surely retart web!
If not then how?
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
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 =)
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)
Hello,
I followed the steps and the ngx_pagespeed was successfully installed.
But when I run
I am getting some errors with unknown directives.
Example:
This is the output from my nginx -vV
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.
I followed the steps and the ngx_pagespeed was successfully installed.
But when I run
Code: Select all
nginx -t && nginx -s reload
Example:
Code: Select all
nginx: [emerg] unknown directive "gzip" in /etc/nginx/nginx.conf:59
nginx: configuration file /etc/nginx/nginx.conf test failed
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 appreciate any help.
Kind regards.
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
@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)."
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)
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.
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.
-
- Posts: 12
- Joined: Mon May 01, 2017 8:38 am
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
I'm getting this error
make: *** No rule to make target 'install'. Stop.
Any resolutions for this?
make: *** No rule to make target 'install'. Stop.
Any resolutions for this?
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
Give us some more info, What OS & version are you on ?pramathesh wrote:I'm getting this error
make: *** No rule to make target 'install'. Stop.
Any resolutions for this?
Do you have build-essentials pkg installed ? are you running make as sudo ? does ./configure give you some dependency errors ?
-
- Posts: 9
- Joined: Sun Nov 12, 2017 6:18 am
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
I found it much easier to do it the Google Pagespeed suggested way:
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: 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.
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
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"
Let it do all the heavy lifting.
Re: HOWTO Install ngx_pagespeed (Google PageSpeed)
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?
Unfortunately, I had issues with my ISPCONFIG installation.
Can you please provide some help for those who already have nginx & ispconfig installed?
Last edited by skurudo on Mon Mar 12, 2018 6:57 am, edited 2 times in total.
Reason: spamlink deleted
Reason: spamlink deleted