ngx_pagespeed Module + ISPConfig

151 views
Skip to first unread message

Isai

unread,
Jan 4, 2021, 7:52:50 PM1/4/21
to ngx-pagespeed-discuss
What would an ngx_pagespeed Module installation look like for those who already have NGINX, installed with ISPConfig?
Regards!

Longinos

unread,
Jan 5, 2021, 6:34:23 AM1/5/21
to ngx-pagespeed-discuss
Hi
You must build the module with the exact same parameters that the installed nginx have. You can view it with nginx -V.
Then you have to include a load_module statement like any other module.
And need to add config parameters for the module in yours config files.

Isai

unread,
Jan 5, 2021, 3:34:12 PM1/5/21
to ngx-pagespeed-discuss
I tried to follow this tutorial. -->> https://www.howtoforge.com/how-to-install-nginx-with-google-pagespeed-on-ubuntu-20-04/
But, I did not download NGINX, because I had already installed it with ISPCONFIG.

Captura de Tela_selecionar área_20210105173209.png

So, when you reach that stage "" I don't know what to do. The path to my NGINX installation is in  /etc/ nginx.

Longinos

unread,
Jan 6, 2021, 5:01:03 AM1/6/21
to ngx-pagespeed-discuss
Hi
I don´t know how to build only the module.
But a pth can be:
1.- download the same nginx version you have installed with ISPconfig, source pakage.
2.-  Build pagespeed module as stated here: https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
3.-  Copy the pagespeed module to the modules dir for nginx (Maybe /etc/nginx/modules)
4.- Make changes to the nginx config files
Remember, you need to use the same exact parameters the installed nginx. (You can see it with nginx -V)

Shane Marsh

unread,
Jan 6, 2021, 7:13:52 AM1/6/21
to ngx-pagespeed-discuss
If it's any help, these are the notes I made after 1.14.36.1 was released. I compiled the latest version manually on Ubuntu. Obviously replace the ./configure arguments with whatever you use for your setup (nginx -V). You need to keep the add module at a minimum. 


** GET MOD PAGESPEED **
mkdir incubator-pagespeed-ngx-latest-stable
cd incubator-pagespeed-ngx-latest-stable
unzip v1.14.33.1-RC1.zip
cd incubator-pagespeed-ngx-1.14.33.1-RC1
tar -xvf psol-1.14.36.1-apache-incubating-x64.tar.gz
cd ../../

** GET NGINX **
cd nginx-1.19.1

** COMPILE **
./configure --add-module=/home/ubuntu/incubator-pagespeed-ngx-latest-stable/incubator-pagespeed-ngx-1.14.33.1-RC1 --prefix=/usr/local/share/nginx --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/local/sbin --http-log-path=/var/html/logs/nginx/access.log --error-log-path=/var/html/logs/nginx/error.log --with-http_gzip_static_module --with-threads --user=www-data --group=www-data

make
sudo make install

Shane Marsh

unread,
Jan 6, 2021, 7:26:47 AM1/6/21
to ngx-pagespeed-discuss
Longinos, Just wanted to ask if the automated build script (https://raw.githubusercontent.com/pagespeed/ngx_pagespeed/master/scripts/build_ngx_pagespeed.sh) is still outdated? The last time I looked into this I was told that 1.14.36.1 was only officially available for Apache not Nginx (hence the unusual build instructions I posted above). The automated script still seems to have references to https://dl.google.com/dl/page-speed/psol/ so will probably only build 1.13.35.2 (assuming it still even works!).

Longinos

unread,
Jan 7, 2021, 6:06:06 AM1/7/21
to ngx-pagespeed-discuss
AFAIK still outdated. All these stuff is managed by @Oschaff.
All the build process have changed between 1.13.35.2 and 1.14.36.1, and I think the build process in apache module is not finished.
As you know the apache module is needed to get the psol library.
Until the build process for apache module is not finished, nginx module can't be updated. But this is my feeling, I don´t know it exactly.
Better ask @Oschaff in github repo.

Otto van der Schaaf

unread,
Jan 7, 2021, 6:19:16 PM1/7/21
to ngx-pagesp...@googlegroups.com
The build process between 1.13.x (branch 35) and 1.14.x (branch 36) hasn't changed, but that rather is the case on the master branch of apache/incubator-pagespeed-mod.
ngx_pagespeed should be able to build against mod_pagespeed branch 36; but the automated procedure might need a fix as the required pre-cooked pagespeed automatic binary no longer gets hosted by google. Instead, it now resides over at https://dist.apache.org/repos/dist/release/incubator/pagespeed/1.14.36.1/ (x64 only).

As for the master branches: I think that the mod_pagespeed build is able to produce a suitable pagespeed_automatic.a for ngx_pagespeed to link against over there, but I anticipate it will take some slightly annoying yet relatively easy work to amend a couple of include path expectations on the ngx_pagespeed side.

Otto

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ngx-pagespeed-discuss/53ef9932-959c-4f76-8c0d-0f93edb0a2aen%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages