How to Install the GeoIP2 module for Nginx on the Baota Panel (aaPanel)

V Records 7,893 Views , , 1 Comment

Regular nginx installation geoip2 module can also refer to this article.Just pay attention to the * in the article.

Because nginx is already installed through the panel, We ignore the introduction of Nginx Install and some basic settings.

Download the GeoLite2 mmdb:

Install libmaxminddb

Install the ngx_http_geoip2_module *

* “/www/server/nginx/src” is my module directory in the BaoTa. You can change it to your own directory.

Before configure, you may need use ‘nginx – V’ to check out the Nginx’s original build parameters.

ngx_http_geoip2_module Configuration

Nginx Conf

The # is the original example of ngx_http_geoip2_module github

Temporarily come to an end.

Some useful links :

GeoLite2-Country.mmdb

GeoLite2-City.mmdb

ngx_http_geoip2_module – github

libmaxminddb – github


This article was first published by V on 2019-02-01 and can be reprinted with permission, but please be sure to indicate the original link address of the article :http://www.nginxer.com/records/how-to-install-the-geoip2-module-for-nginx-on-the-baota-panel/

1 Comment

  1. V February 17, 2020 at 10:52 am Reply

    now download need to add access code.

    use:

    https://download.maxmind.com/app/geoip_download_by_token?edition_id=GeoLite2-Country&license_key={LICENSE KEY HERE}&suffix=mmdb.gz

Leave a Reply

Your email address will not be published. Required fields are marked *

Go