Country Blocking with nginx GeoIP on Ubuntu/Debian

On Ubuntu/Debian, install nginx geoip module with

Now edit nginx.conf

Find

Add below

You can add 2 letter country code and set ye/no as required. To implement GeoIP blocking for a web site, you need to edit server entry for the web site. In this cause, i will use the default […]

Read More…

Install GeoIP PHP Module in Ubuntu

To install GeoIP php module in Ubuntu, run

To enable module, run

You can see the PHP module with command php -m

Also it will be listed in phpinfo page. geoip […]

Read More…