Recently there is a Web site project requirements: the need to block domestic requests. Take the time to study the information in this area. The best way to find it now is to use the Nginx GeoIP module to realize the region's identification. Then
To use GeoIP, you need to recompile nginx, my system is centos6.5,nginx with Tengine, the required package:GCC, gcc-c++, OpenSSL, Openssl-devel, GeoIP Library, GeoLite Country, GeoLite City, Pcre, Tengine21. Download the required Packageswget http://
Awstats is a foreign open source of the website PV flow monitoring software, can obtain Apache or Nginx log information, the log useful information to integrate into the HTML page display, because the content of the analytic log is very meticulous,
After AWStats is installed by default, it does not have the country or region information to identify visitors. Therefore, you need to install the plug-in to support AWStats to list the countries and regions of visitors for analysis.
Geoip is a
https://pypi.python.org/pypi/GeoIP/RequirementsPython 2.5+ or 3.3+GeoIP C Library 1.4.7 or greaterInstallationWith Pip:$ pip Install GeoIPFrom Source:$ python setup.py build$ python setup.py installDownload and install PythonA very important step is
There are many databases for geographic location query, most of which are available in free versions. There are pure databases in China, but they only provide the geographical location information of text and do not provide latitude and longitude
GeoIP database: http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz.First, download the required resources on the Maxmind websiteAfter downloading, we unzip it to D disk, specific installation document see GeoIP Legacy
Today, the high volume of servers, IP from China, and is not normal access to the IP, resulting in PHP-FPM CPU 100%, the site is very slow to open, has already used iptables limit the number of connections, but because the same IP connection number
The geoip database of maxmind can accurately obtain the user's geographic location information based on the user's IP address. Firefox uses it to calculate the region where the user is downloaded.
It mainly includes two data files stored in
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.