I have installed nginx/1.12.1 and Phusion Passenger by APT from https://oss-binaries.phusionpassenger.com repository. It's configured correctly within my Rails apps.
Thereafter, I want to improve nginx by adding nginx pagespeed module dynamically following this https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source to build ngx_pagespeed module and following this https://www.nginx.com/blog/compiling-dynamic-modules-nginx-plus/ to compile dynamic module, by running :
$ ./configure --with-compat --add-dynamic-module=$HOME/ngx_pagespeed-${NPS_VERSION} ${PS_NGX_EXTRA_FLAGS}
$ make modules
After that, I copied ngx_pagespeed.so from objs/ folder into /etc/nginx/modules and of course loading the module into nginx.conf by adding load_module modules/ngx_pagespeed.so;
on it. But when I reload nginx it's reproduced following error:
nginx: [emerg] module "/usr/share/nginx/modules/ngx_pagespeed.so" is not binary compatible in /etc/nginx/nginx.conf:5
My question is:
How do I add ngx_pagespeed module on nginx from PhusionPassenger APT?
What is the right
./configure
flags for compiling additional module without forgetting previous installed nginx (from PhusionPassenger APT) modules?
Thank you