I'm trying to configure
nginx to build the GeoIP2 module, by following this installation:
https://github.com/leev/ngx_http_geoip2_module
first I still didn't understand what is defrences between static
and dynamic
modules,
and why can't I just apt install
that module..
The problemm is that I want to build/create it on a diffrent machine, so I had to copy the configure
flags from the destination machine by copy the output of this command:
nginx -V
and then I ran this command on the test machine:
PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/" ./configure --without-http_rewrite_module --without-http_gzip_module --add-module=/path/ngx_http_geoip2_module-3.3 (PASTE DESTINATION NGINX -V OUTPUT)
make
make install
Then after succession I copied the file name: ngx_http_geoip2_module.so
to destination machine
and ran nginx -t
I got this error:
nginx: [emerg] module "/etc/nginx/modules/ngx_http_geoip2_module.so" is not binary compatible in /etc/nginx/nginx.conf
nginx: configuration file /etc/nginx/nginx.conf test failed
My destination machine: Ubuntu 20 Nginx 1.20.1