{"id":346451,"date":"2023-03-07T21:00:58","date_gmt":"2023-03-07T21:00:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=346451"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=346451","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u043d\u0430 \u0432\u0435\u0431-\u0440\u0435\u0441\u0443\u0440\u0441\u0435 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043d\u043e\u0432\u044b\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432 \u0420\u043e\u0441\u0441\u0438\u0439\u0441\u043a\u043e\u0439 \u0424\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u0438<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432 \u043d\u044b\u043d\u0435\u0448\u043d\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u044f\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043c, \u043b\u0438\u0431\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 <strong>MaxMind<\/strong> <strong>GeoIP2<\/strong>. \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a, <strong>\u041a\u0440\u044b\u043c<\/strong>, <strong>\u0414\u041d\u0420<\/strong>, <strong>\u041b\u041d\u0420<\/strong>, <strong>\u0417\u0430\u043f\u043e\u0440\u043e\u0436\u0441\u043a\u0430\u044f<\/strong> \u0438 <strong>\u0425\u0435\u0440\u0441\u043e\u043d\u0441\u043a\u0430\u044f<\/strong> \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0430 \u0442\u0430\u043a\u0436\u0435 <strong>\u0421\u0435\u0432\u0430\u0441\u0442\u043e\u043f\u043e\u043b\u044c<\/strong> \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0423\u043a\u0440\u0430\u0438\u043d\u044b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438, \u0441\u043a\u0430\u0436\u0435\u043c, \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u0424, \u0442\u043e \u044d\u0442\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u043d\u0435 \u0443 \u0434\u0435\u043b.<\/p>\n<p>\u0422\u0430\u043a \u044f, \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0432 \u0441\u0432\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u0441 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u0424, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u043c\u043e\u0438 \u0434\u0440\u0443\u0437\u044c\u044f \u0438\u0437 \u041a\u0440\u044b\u043c\u0430 \u0438 \u0414\u041d\u0420 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f (\u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438). \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044d\u0442\u0430 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f, \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0441\u0431\u043e\u043c \u0435\u0435 \u0440\u0435\u0448\u0438\u0442\u044c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0436\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 <strong>nginx<\/strong> \u0438 \u043c\u043e\u0434\u0443\u043b\u0435 <strong>ngx_http_geoip2_module<\/strong>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 MaxMind, \u043f\u043e\u0434 <strong>Ubuntu 20.04<\/strong>. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f GeoIP2, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u043d\u043e\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0411\u0414. \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0430\u0437\u044b <strong>GeoLite2<\/strong>. \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041f\u0435\u0440\u0432\u0430\u044f, \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 IP, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0440\u0430\u043d\u0435 (<strong>GeoLite2-Country)<\/strong>, \u0432\u0442\u043e\u0440\u0430\u044f &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435 (<strong>GeoLite2-ASN<\/strong>), \u0438 \u0442\u0440\u0435\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 (<strong>GeoLite2-City<\/strong>). \u0414\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0440\u0435\u0442\u044c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b GeoLite2 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c MaxMind. \u0415\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u0442\u0443\u0442: <a href=\"https:\/\/www.maxmind.com\/en\/geolite2\/signup\" rel=\"noopener noreferrer nofollow\">https:\/\/www.maxmind.com\/en\/geolite2\/signup<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0437-\u0437\u0430 \u0441\u0430\u043d\u043a\u0446\u0438\u0439 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u0443, \u0442\u043e \u044d\u0442\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043b\u044e\u0431\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0444\u0430\u0439\u043b\u0430 <strong>GeoLite2-City.mmdb<\/strong>, \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e (\u0434\u043b\u044f Ubuntu) \u0432 \u043f\u0430\u043f\u043a\u0443 &#171;<code>\/usr\/share\/GeoIP\/<\/code>&#171;.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0434\u0430\u043b\u043e\u0441\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u0435\u044f \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u0442\u0432\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u043e\u0439, \u043f\u0440\u043e\u0442\u0438\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0430\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u044b?), \u0442\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code>$ sudo add-apt-repository ppa:maxmind\/ppa<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443:<\/p>\n<pre><code>$ sudo apt update $ sudo apt install geoipupdate $ sudo apt install geoipupdate<\/code><\/pre>\n<p> \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/GeoIP.conf<\/code><br \/> \u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <strong>AccountID<\/strong> &#8212; \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430,<br \/> <strong>LicenseKey<\/strong> &#8212; \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435.<\/p>\n<p><strong>EditionIDs<\/strong> &#8212; \u043a\u0430\u043a\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435:<\/p>\n<pre><code>EditionIDs GeoLite2-City<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 <strong>nginx \/ ngx_http_geoip2_module<\/strong>. \u0421\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438\u0437 \u0448\u0442\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f Ubuntu \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<pre><code>$ sudo apt-get install nginx-full<\/code><\/pre>\n<p>\u0421\u044e\u0434\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440 nginx, \u0442\u0430\u043a \u0438 \u043c\u043e\u0434\u0443\u043b\u044c ngx_http_geoip2_module.<br \/> \u041e\u0431\u0440\u0430\u0449\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0434\u0443\u043b\u044c geoip2. \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043d\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c nginx. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b <code>\/etc\/nginx\/nginx.conf<\/code>:<\/p>\n<pre><code>load_module modules\/ngx_http_geoip2_module.so;<\/code><\/pre>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <strong>geoip_country<\/strong> \u0438 <strong>geoip_city<\/strong>. \u0414\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u043d\u0438 \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>http<\/strong>, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>geoip2 \/usr\/share\/GeoIP\/GeoLite2-City.mmdb {   [\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b]       [...]  }<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c, \u043f\u043e\u043c\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 nginx, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u043f\u043e \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u043c\u0435\u044e\u0449\u0435\u0439 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <strong>MaxMind<\/strong>.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f:<\/p>\n<pre><code>geoip2 \/usr\/share\/GeoIP\/GeoLite2-City.mmdb {   auto_reload 60m;   $geoip2_metadata_city_build metadata build_epoch;   $geoip2_data_country_name country names en;   $geoip2_data_country_code country iso_code;   $geoip2_data_city_name city names en;   $geoip2_data_region_name subdivisions 0 names en;   $geoip2_data_state_code  subdivisions 0 iso_code; }<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>auto_reload<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0410 \u0444\u0430\u0439\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <strong>crontab<\/strong>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p> $<em>geoip2_metadata_city_build<\/em> &#8212; \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0430\u0437\u044b<br \/> $<em>geoip2_data_country_name<\/em> &#8212; \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u044b \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<br \/> $<em>geoip2_data_country_code<\/em> &#8212; \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b<br \/> $<em>geoip2_data_city_name<\/em> &#8212; \u0438\u043c\u044f \u0433\u043e\u0440\u043e\u0434\u0430 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<br \/> $<em>geoip2_data_region_name<\/em> &#8212; \u0438\u043c\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u0430 (\u041a\u0440\u044b\u043c, \u0421\u0435\u0432\u0430\u0441\u0442\u043e\u043f\u043e\u043b\u044c, \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0438 \u0442. \u0434.)<br \/> $<em>geoip2_data_state_code<\/em> &#8212; \u043a\u043e\u0434 \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u042d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438. \u0411\u044b\u0432\u0430\u044e\u0442 \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u0434\u044b, \u0442\u0440\u0435\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435, \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u043a\u043e\u0434\u044b. \u0418 \u0434\u0430\u0436\u0435 \u043e\u0434\u043d\u043e\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u043e\u0432\u0441\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0431\u0430\u0437\u0435.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041f\u043e\u043b\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 MaxMind, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 \u0438\u0445 \u0441\u0430\u0439\u0442\u0435.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<p>$<em>geoip2_data_country_code<\/em> &#8212; \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b<br \/>$<em>geoip2_data_state_code<\/em> &#8212; \u043a\u043e\u0434 \u0440\u0435\u0433\u0438\u043e\u043d\u0430<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0443\u0442 \u0436\u0435, \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>http<\/strong> \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <strong>nginx<\/strong>, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>map \"$geoip2_data_country_code:$geoip2_data_state_code\" $allowed_reg {   default no;   ~^RU:\\w*$ yes; #\u0420\u043e\u0441\u0441\u0438\u044f   ~^BY:\\w*$ yes; #\u0411\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u0438\u044f   ~^AM:\\w*$ yes; #\u0410\u0440\u043c\u0435\u043d\u0438\u044f   ~^KZ:\\w*$ yes; #\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d   ~^KG:\\w*$ yes; #\u041a\u044b\u0440\u0433\u044b\u0437\u0441\u0442\u0430\u043d   UA:40 yes; #\u0421\u0435\u0432\u0430\u0441\u0442\u043e\u043f\u043e\u043b\u044c   UA:43 yes; #\u041a\u0440\u044b\u043c   UA:14 yes; #\u0414\u043e\u043d\u0435\u0446\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   UA:09 yes; #\u041b\u0443\u0433\u0430\u043d\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   UA:23 yes; #\u0417\u0430\u043f\u043e\u0440\u043e\u0436\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   UA:65 yes; #\u0425\u0435\u0440\u0441\u043e\u043d\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   GE:AB yes; #\u0410\u0431\u0445\u0430\u0437\u0438\u044f }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f $<em>allowed_reg<\/em> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>SSI<\/strong>.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>MAP<\/strong>. \u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u043b\u043e\u0436\u043d\u0443\u044e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u043e\u043d \u043f\u043e \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0441\u0442\u0440\u0430\u043d\u044b \u0438 \u043a\u043e\u0434\u0443 \u0440\u0435\u0433\u0438\u043e\u043d\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n<pre><code>server {   #Block forbidden country   if ($allowed_reg = no) {     return 444;   }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 SSI \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n<pre><code>&lt;!--# if expr=\"$allowed_reg = yes\" --> [...] &lt;!--# else --> [...] &lt;!--# endif --><\/code><\/pre>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438\u043b\u0438 \u0432\u044b\u0434\u0430\u0447\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/721070\/\"> https:\/\/habr.com\/ru\/post\/721070\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432 \u043d\u044b\u043d\u0435\u0448\u043d\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u044f\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043f\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043c, \u043b\u0438\u0431\u043e \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0432\u044b\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0430\u043c\u0435\u0440\u0438\u043a\u0430\u043d\u0441\u043a\u0438\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 <strong>MaxMind<\/strong> <strong>GeoIP2<\/strong>. \u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u0438 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u043d\u043e \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a, <strong>\u041a\u0440\u044b\u043c<\/strong>, <strong>\u0414\u041d\u0420<\/strong>, <strong>\u041b\u041d\u0420<\/strong>, <strong>\u0417\u0430\u043f\u043e\u0440\u043e\u0436\u0441\u043a\u0430\u044f<\/strong> \u0438 <strong>\u0425\u0435\u0440\u0441\u043e\u043d\u0441\u043a\u0430\u044f<\/strong> \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0430 \u0442\u0430\u043a\u0436\u0435 <strong>\u0421\u0435\u0432\u0430\u0441\u0442\u043e\u043f\u043e\u043b\u044c<\/strong> \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0431\u0430\u0437\u0435 \u043a\u0430\u043a \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0423\u043a\u0440\u0430\u0438\u043d\u044b. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0435\u0441\u043b\u0438, \u0441\u043a\u0430\u0436\u0435\u043c, \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u0424, \u0442\u043e \u044d\u0442\u0438 \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u043d\u0435 \u0443 \u0434\u0435\u043b.<\/p>\n<p>\u0422\u0430\u043a \u044f, \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0432 \u0441\u0432\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u0441 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0420\u0424, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b, \u0447\u0442\u043e \u043c\u043e\u0438 \u0434\u0440\u0443\u0437\u044c\u044f \u0438\u0437 \u041a\u0440\u044b\u043c\u0430 \u0438 \u0414\u041d\u0420 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f (\u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043c\u043e\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438). \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u044d\u0442\u0430 \u043b\u0435\u0433\u043a\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f, \u0438 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0441\u0431\u043e\u043c \u0435\u0435 \u0440\u0435\u0448\u0438\u0442\u044c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0436\u0443 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>\u041c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 <strong>nginx<\/strong> \u0438 \u043c\u043e\u0434\u0443\u043b\u0435 <strong>ngx_http_geoip2_module<\/strong>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0430\u0437\u043e\u0439 MaxMind, \u043f\u043e\u0434 <strong>Ubuntu 20.04<\/strong>. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0435\u0441\u0442\u044c, \u0447\u0442\u043e \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f GeoIP2, \u0438\u043c\u0435\u044e\u0449\u0430\u044f \u043d\u043e\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0411\u0414. \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0430\u0437\u044b <strong>GeoLite2<\/strong>. \u041e\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u0440\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041f\u0435\u0440\u0432\u0430\u044f, \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 IP, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0442\u0440\u0430\u043d\u0435 (<strong>GeoLite2-Country)<\/strong>, \u0432\u0442\u043e\u0440\u0430\u044f &#8212; \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435 (<strong>GeoLite2-ASN<\/strong>), \u0438 \u0442\u0440\u0435\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 (<strong>GeoLite2-City<\/strong>). \u0414\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0440\u0435\u0442\u044c\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b GeoLite2 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u0447\u0435\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c MaxMind. \u0415\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u0442\u0443\u0442: <a href=\"https:\/\/www.maxmind.com\/en\/geolite2\/signup\" rel=\"noopener noreferrer nofollow\">https:\/\/www.maxmind.com\/en\/geolite2\/signup<\/a><\/p>\n<p>\u0415\u0441\u043b\u0438 \u0438\u0437-\u0437\u0430 \u0441\u0430\u043d\u043a\u0446\u0438\u0439 \u043d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0430\u0437\u0443, \u0442\u043e \u044d\u0442\u043e \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432. \u0413\u043b\u0430\u0432\u043d\u043e\u0435, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u043b\u044e\u0431\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0432\u0435\u0436\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e \u0444\u0430\u0439\u043b\u0430 <strong>GeoLite2-City.mmdb<\/strong>, \u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0435\u0433\u043e (\u0434\u043b\u044f Ubuntu) \u0432 \u043f\u0430\u043f\u043a\u0443 &#171;<code>\/usr\/share\/GeoIP\/<\/code>&#171;.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0434\u0430\u043b\u043e\u0441\u044c (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043c\u0435\u044f \u0434\u0432\u043e\u0439\u043d\u043e\u0435 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u0442\u0432\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u043e\u0439, \u043f\u0440\u043e\u0442\u0438\u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u0430\u043d\u043a\u0446\u0438\u0438 \u043d\u0435 \u0432\u0432\u0435\u0434\u0435\u043d\u044b?), \u0442\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430.<\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439:<\/p>\n<pre><code>$ sudo add-apt-repository ppa:maxmind\/ppa<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u0443:<\/p>\n<pre><code>$ sudo apt update $ sudo apt install geoipupdate $ sudo apt install geoipupdate<\/code><\/pre>\n<p> \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>\/etc\/GeoIP.conf<\/code><br \/> \u0417\u0434\u0435\u0441\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <strong>AccountID<\/strong> &#8212; \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u0448\u0435\u0433\u043e \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430,<br \/> <strong>LicenseKey<\/strong> &#8212; \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435, \u0432 \u0432\u0430\u0448\u0435\u043c \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435.<\/p>\n<p><strong>EditionIDs<\/strong> &#8212; \u043a\u0430\u043a\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435:<\/p>\n<pre><code>EditionIDs GeoLite2-City<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 <strong>nginx \/ ngx_http_geoip2_module<\/strong>. \u0421\u0430\u043c\u044b\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0438\u0437 \u0448\u0442\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f Ubuntu \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<\/p>\n<pre><code>$ sudo apt-get install nginx-full<\/code><\/pre>\n<p>\u0421\u044e\u0434\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a \u0441\u0430\u043c \u0441\u0435\u0440\u0432\u0435\u0440 nginx, \u0442\u0430\u043a \u0438 \u043c\u043e\u0434\u0443\u043b\u044c ngx_http_geoip2_module.<br \/> \u041e\u0431\u0440\u0430\u0449\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0434\u0443\u043b\u044c geoip2. \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 \u043d\u043e\u0432\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c nginx. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0444\u0430\u0439\u043b <code>\/etc\/nginx\/nginx.conf<\/code>:<\/p>\n<pre><code>load_module modules\/ngx_http_geoip2_module.so;<\/code><\/pre>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <strong>geoip_country<\/strong> \u0438 <strong>geoip_city<\/strong>. \u0414\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043e\u043d\u0438 \u043d\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b.<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>http<\/strong>, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>geoip2 \/usr\/share\/GeoIP\/GeoLite2-City.mmdb {   [\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b]       [...]  }<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c, \u043f\u043e\u043c\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 nginx, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u0430\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u043f\u043e \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0438\u043c\u0435\u044e\u0449\u0435\u0439 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <strong>MaxMind<\/strong>.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0442\u0430\u043a\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f:<\/p>\n<pre><code>geoip2 \/usr\/share\/GeoIP\/GeoLite2-City.mmdb {   auto_reload 60m;   $geoip2_metadata_city_build metadata build_epoch;   $geoip2_data_country_name country names en;   $geoip2_data_country_code country iso_code;   $geoip2_data_city_name city names en;   $geoip2_data_region_name subdivisions 0 names en;   $geoip2_data_state_code  subdivisions 0 iso_code; }<\/code><\/pre>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>auto_reload<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0437\u0430\u043d\u043e\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0410 \u0444\u0430\u0439\u043b \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 <strong>crontab<\/strong>. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p> $<em>geoip2_metadata_city_build<\/em> &#8212; \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043c\u0435\u0442\u043a\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 \u0431\u0430\u0437\u044b<br \/> $<em>geoip2_data_country_name<\/em> &#8212; \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u044b \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<br \/> $<em>geoip2_data_country_code<\/em> &#8212; \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b<br \/> $<em>geoip2_data_city_name<\/em> &#8212; \u0438\u043c\u044f \u0433\u043e\u0440\u043e\u0434\u0430 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c<br \/> $<em>geoip2_data_region_name<\/em> &#8212; \u0438\u043c\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u0430 (\u041a\u0440\u044b\u043c, \u0421\u0435\u0432\u0430\u0441\u0442\u043e\u043f\u043e\u043b\u044c, \u041c\u043e\u0441\u043a\u043e\u0432\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0438 \u0442. \u0434.)<br \/> $<em>geoip2_data_state_code<\/em> &#8212; \u043a\u043e\u0434 \u0440\u0435\u0433\u0438\u043e\u043d\u0430. \u042d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438. \u0411\u044b\u0432\u0430\u044e\u0442 \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u0434\u044b, \u0442\u0440\u0435\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435, \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u043a\u043e\u0434\u044b. \u0418 \u0434\u0430\u0436\u0435 \u043e\u0434\u043d\u043e\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432\u043e\u0432\u0441\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0431\u0430\u0437\u0435.<\/p>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u044f\u0437\u044b\u043a\u0435. \u041f\u043e\u043b\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 MaxMind, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0430 \u0438\u0445 \u0441\u0430\u0439\u0442\u0435.<\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:<\/p>\n<p>$<em>geoip2_data_country_code<\/em> &#8212; \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b<br \/>$<em>geoip2_data_state_code<\/em> &#8212; \u043a\u043e\u0434 \u0440\u0435\u0433\u0438\u043e\u043d\u0430<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0443\u0442 \u0436\u0435, \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 <strong>http<\/strong> \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <strong>nginx<\/strong>, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u0440\u0435\u0433\u0438\u043e\u043d\u044b \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>map \"$geoip2_data_country_code:$geoip2_data_state_code\" $allowed_reg {   default no;   ~^RU:\\w*$ yes; #\u0420\u043e\u0441\u0441\u0438\u044f   ~^BY:\\w*$ yes; #\u0411\u0435\u043b\u043e\u0440\u0443\u0441\u0441\u0438\u044f   ~^AM:\\w*$ yes; #\u0410\u0440\u043c\u0435\u043d\u0438\u044f   ~^KZ:\\w*$ yes; #\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d   ~^KG:\\w*$ yes; #\u041a\u044b\u0440\u0433\u044b\u0437\u0441\u0442\u0430\u043d   UA:40 yes; #\u0421\u0435\u0432\u0430\u0441\u0442\u043e\u043f\u043e\u043b\u044c   UA:43 yes; #\u041a\u0440\u044b\u043c   UA:14 yes; #\u0414\u043e\u043d\u0435\u0446\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   UA:09 yes; #\u041b\u0443\u0433\u0430\u043d\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   UA:23 yes; #\u0417\u0430\u043f\u043e\u0440\u043e\u0436\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   UA:65 yes; #\u0425\u0435\u0440\u0441\u043e\u043d\u0441\u043a\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c   GE:AB yes; #\u0410\u0431\u0445\u0430\u0437\u0438\u044f }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f $<em>allowed_reg<\/em> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043b\u0438\u0431\u043e \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 <strong>SSI<\/strong>.<\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435\u043c, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <strong>MAP<\/strong>. \u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0430\u043d \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u0430 \u0440\u0435\u0433\u0438\u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u043e\u043d\u043e\u0432, \u0438\u043c\u0435\u044e\u0449\u0438\u0445 \u043b\u043e\u0436\u043d\u0443\u044e \u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0435\u0433\u0438\u043e\u043d \u043f\u043e \u0434\u0432\u0443\u0445\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0441\u0442\u0440\u0430\u043d\u044b \u0438 \u043a\u043e\u0434\u0443 \u0440\u0435\u0433\u0438\u043e\u043d\u0430.<\/p>\n<p>\u0414\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n<pre><code>server {   #Block forbidden country   if ($allowed_reg = no) {     return 444;   }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 SSI \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n<pre><code>&lt;!--# if expr=\"$allowed_reg = yes\" --> [...] &lt;!--# else --> [...] &lt;!--# endif --><\/code><\/pre>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0432\u0438\u0441\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0435\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0438\u043b\u0438 \u0432\u044b\u0434\u0430\u0447\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430, \u0438\u043c\u0435\u044e\u0449\u0435\u0433\u043e \u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/721070\/\"> https:\/\/habr.com\/ru\/post\/721070\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-346451","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=346451"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/346451\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=346451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=346451"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=346451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}