reasons for using the GeoIP module (why): Requests are forwarded to customers in different cities for the needs of the project, eg:When Tianjin User A visited www.XXXX.com, Nginx forwarded this request to the Tianjin server and the domain name of
The Nginx Access log we collected through Logstash already contains the data for the client IP (REMOTE_ADDR), but only this IP is not enough, the location of the Kibana to display the requested source needs to be implemented by GEOIP database. GeoIP
Believe that have done awstats have used the open source Geoip.dat IP database, just nginx wiki on the GeoIP module, so that can achieve a regional load balance, but the Maxmind of IP database for China's support is not too good, but now is not bad ~
Here are a brief outline of the steps needed to install GeoIP Legacy City on Linux/unix. The installation on Windows are similar, just replace the tar command with WINZIP or a similar ZIP program.Step 1–download DatabaseFor GeoIP clients, go to the
If your m website is for English customers and you may not want to accept access from Chinese IP segments, you can use Apache's geoip module to easily achieve this.
Http://www.maxmind.com/app/mod_geoip
For reference only!
I. Briefly
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
Installation methodhttp://php.net/manual/en/geoip.installation.phpIntroduction to PHP Functions in GeoIP:http://php.net/manual/en/book.geoip.phpIf the CentOS installation prompt does not have a package, perform the following:RPM-IVH http://ftp.jaist.
I believe that awstats has used open source geoip. the dat ip database is just nginx wiki with the geoip module, which can achieve regional load balancing. However, maxmind's ip database does not support China very well, but it is also good now
How to block network traffic in Linux based on country location
As a system administrator who maintains a Linux production server, you may encounter the following situations: You need to selectively block or allow network traffic to pass through
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.