I recently decided it was time to migrate my UFS ezjails based Digital Ocean droplet to the new and sparkly FreeBSD 10.3 ZFS droplet whilst transitioning to iocage. To make my life harder I thought it was a prime opportunity to build everything from scratch rather than tar the jails as per these instructions.
Everything was going well until I tried to start Nginx.
$ sudo /usr/local/etc/rc.d/nginx restart Performing sanity check on nginx configuration: nginx: [emerg] unknown directive "geoip_country" in /usr/local/etc/nginx/nginx.conf:38 nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Having found where the module resided
$ pkg info -l nginx | fgrep geoip /usr/local/libexec/nginx/ngx_http_geoip_module.so
I made the following change to my nginx.conf and everything fired back in to life.
#user nobody; worker_processes 2; ### Load Modules### load_module "/usr/local/libexec/nginx/ngx_http_geoip_module.so";