Comments on Using GeoIP With Nginx On Ubuntu 12.04

Using GeoIP With Nginx On Ubuntu 12.04 This tutorial explains how to use the GeoIP module with nginx on Ubuntu 12.04 to find out where your visitors come from. The GeoIP module sets multiple variables like $geoip_country_name, $geoip_country_code, $geoip_city, etc. that you can use in your PHP scripts or directly in your nginx configuration, for example to serve content in different languages based on the user's country.

4 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Math

Hey ! 

Thanks a lot for this tutorial. I tried to used it to install geoip module into my nginx 1.9.7 (last meanline version), but failed.

Have you done any tutorial about installing geoip into nginx on debian ? (with libmaxminddb and geoIP libraries).

Thanks again :) 

By: darko

Hi,

Exact tutorial.

Worked like a charm on ubuntu+ngnix (latest versions as of date of posting).

Thank you, MfG

darko

By: Quang

Thank you for this tutoial

By: Quang

Can you explain more or make this more clear how to do.

Make sure you use the line include /etc/nginx/proxy.conf; in your nginx proxy configuration because otherwise the backend cannot use the GeoIP variables