nanobox-engine-php
nanobox-engine-php copied to clipboard
geoip not working with nginx - unknown directive "geoip_country"
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?