Apply directive in nginx.conf only if module is installed (apache ifmodule alternative)

Viewed 2138

Is there any alternative to the ifmodule directive in apache?

I'm trying to create a generic nginx.conf file for our company, but some sites have special requirements as having the geoip module. In these sites, I need to declare a directive in nginx.conf, http section, to define the country database.

The problem is that in other servers, that module is not compilled, so I need a caveat to load it only if that module is installed.

Any idea? Thanks in advance!

1 Answers
Related