Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geoip not working with nginx - unknown directive "geoip_country" #82

Open
lakano opened this issue Dec 30, 2017 · 0 comments
Open

geoip not working with nginx - unknown directive "geoip_country" #82

lakano opened this issue Dec 30, 2017 · 0 comments

Comments

@lakano
Copy link

lakano commented Dec 30, 2017

Hi !

We have:

  • downloaded the MaxMind DB files and put them into /app/geoip/,
  • used the geoip_custom_directory,
  • added the php extension geoip
  • requested to install the GeoIP package (listed in available nanobox packages)

But this doesn't works.

If we look in your /data/etc/nginx/nginx.conf file, there is no directive geoip_country ( cf. documentation )

If we copy your default nginx.conf, add the 2 geoip directives lines, and force our modified nginx.conf to be used, we get an error « unknown directive "geoip_country" »

run.config:
  extra_packages:
    - GeoIP
  engine: php
  engine.config:
    webserver: nginx
    document_root: /public/
    nginx_index_list:
      - index.php
      - index.html
    nginx_default_gateway: index.php
    geoip_custom_directory: 'app/geoip/'
    runtime: php-7.2
    extensions:
      - session
      - curl
      - fileinfo
      - gd
      - gmp
      - exif
      - hash
      - igbinary
      - iconv
      - imagick
      - intl
      - json
      - mbstring
      - mcrypt
      - pdo
      - pdo_mysql
      - pdo_sqlite
      - readline
      - sqlite3
      - xml
      - zip
      - geoip
      - redis
  extra_steps:
    - cp nginx.conf /data/etc/nginx/nginx.conf
  build_triggers:
    - nginx.conf

Do you have any idea to help us to use GeoIP with a custom NginX configuration file please?

@lakano lakano changed the title custom nginx.conf and error: unknown "geoip_city" variable geoip not working with nginx - unknown directive "geoip_country" Jan 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant