SQL: Greatest N per Group

I run into this quite a bit. You have an auto incrementing row where you are interested in the last (most recent) entry made for a group of records.

Nginx GeoIp2 configuration and blocking by country

In a previous blog post I detailed the installation and build process for nginx with a geoip2 module. Here I’ll outline a simple setup that will allow blocking by country code for virtual host entries. Add the following to the nginx config. If you followed my previous tutorial it will be located at /usr/local/nginx/conf/nginx.conf. Add… Continue reading Nginx GeoIp2 configuration and blocking by country

Published
Categorized as nginx

Nginx Geoip2 Setup on Ubuntu 20.04

There are lots of tutorials for setting up nginx for GeoIP using Maxmind’s database. The old .dat style database is being depreciated and being replaced with their new format — mmdb. This requires an updated build for nginx using the new GeoIp2 modules. This guide uses Ubuntu 20.04 server though could be adapted to whatever… Continue reading Nginx Geoip2 Setup on Ubuntu 20.04

Published
Categorized as nginx