Welcome! Log In Create A New Profile

Advanced

Re: unknown directive "geoip_country" for openresty/nginx 1.9.7.4

Francis Daly
October 29, 2019 02:48PM
On Tue, Oct 29, 2019 at 01:57:43PM -0400, skwok wrote:

Hi there,

> I am building a docker container of nginx with modsecurity and geoip on
> Ubuntu Xenial, and I'm stuck with the geoip part as I can't find the
> instructions for version 1.9.7.4, which doesn't support dynamic module. Can
> someone please help?
>
> I've tried a few things as in the following:
>
> 1. Add `--with-http_geoip_module` as an option for configure

That should work.

But you do need to be sure that you are using the nginx that was built
after this ./configure run.

> 4. Declaring geoip_country /usr/share/GeoIP/GeoIP.dat; results in `nginx:
> [emerg] unknown directive "geoip_country" ...'

That error message means that the nginx that is being used, does not
include the geoip module.

If you call the same nginx binary with a "-V" argument, it should show
you the configure arguments that were used when building that binary.

Does that show the full "configure" line that you expect? If not, then
something has happened between your "make" and your deployment.

(I've not tested with openresty, but I believe that it should be the
same as stock nginx from this perspective.)

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

unknown directive "geoip_country" for openresty/nginx 1.9.7.4

skwok October 29, 2019 01:57PM

Re: unknown directive "geoip_country" for openresty/nginx 1.9.7.4

Francis Daly October 29, 2019 02:48PM

Re: unknown directive "geoip_country" for openresty/nginx 1.9.7.4

skwok October 29, 2019 08:13PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready