phplaravelnginxhomesteadgeoip2

homestead install GeoIp2 NGINX module errors


I need to install the https://github.com/leev/ngx_http_geoip2_module on my Homestead. When I recompile nginx in my after.sh first I got an error that the module is not binary compatible, I read that I have to do ./configure with all the original flags Nginx was compiled with.

So I used nginx -V to get all flags, copy&pasted them in my after.sh, but now I am getting errors about missing /config files in some of the modules and other modules need libraries, like: ==> homestead-7: ./configure: error: the HTTP image filter module requires the GD library. ==> homestead-7: You can either do not enable the module or install the libraries.

These here gave me errors about missing files (probably because the /debian/ directory doesn't even exist in the /nginx-1.11.5/ dir I download from nginx. --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/nginx-auth-pam --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/nginx-echo --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/nginx-upstream-fair --add-dynamic-module=/build/nginx-Rrk92d/nginx-1.11.5/debian/modules/ngx_http_substitutions_filter_module

Anybody have experience with this kind of thing and can give me pointers how to do this the right way?


Solution

  • I ended up deinstalling nginx first, then download the newest stable version and recompiling nginx from source before i install the GeoIp2 module, then it works like a charm.