Nginx
-
Nginx - How to Block or Redirect by GeoIP
I've been figuring out how to block or redirect web traffic in Nginx based on the country geoIP.
NOTES
* You need the package nginx-extras for this because this package has the geoIP Nginx plugin.
* I used Japan (JP) in these examples, so change the country code to whatever you wish.APPROACH #1 - BASIC
This uses a locally-downloaded GeoIP database. -
Ubuntu 20.04 Nginx Build Outline
I re-built my LEMP web-server fresh on Ubuntu 20.04, and learned some things along the way. This is my base build outline.
-
Ubuntu 22.04 Nginx Build Outline
I re-built my LEMP web-server fresh on Ubuntu 22.04 and learned some things along the way. This is my base build outline mostly created for my own notes.