Search code examples
nginxpassengergeoipalpine-linux

How can I enable GeoIP support in Phusion Passenger Enterprise's compilation?


I'm trying to install Phusion Passenger Enterprise into an Alpine 3.8 container image by following the official documentation for standalone installs with RubyGems as follows:

However, Passenger won't start because my Nginx configuration template contains geoip_* instructions which the embedded Nginx core of Passenger standalone doesn't support:

*** ERROR: the Nginx configuration that Phusion Passenger Standalone generated internally contains problems. The error message returned by the Nginx engine is:

    nginx: [emerg] unknown directive "geoip_country" in nginx.conf:57
    nginx: configuration file nginx.conf test failed

This probably means that you have a problem in your Nginx configuration template. Please fix your template.

Since Passenger is compiling everything from scratch anyways, how do I ensure that GeoIP is enabled for the internal Nginx core?


Solution

  • The best way to make this work is to use Passenger for Nginx, combined with your own Nginx install. That way you can control what modules you want to enable.