{"id":25600936,"url":"https://github.com/chrislim2888/ip2location-apache-module","last_synced_at":"2025-04-13T06:43:17.931Z","repository":{"id":56013101,"uuid":"9742629","full_name":"chrislim2888/IP2Location-Apache-Module","owner":"chrislim2888","description":"This is an IP2Location Apache Module that enables the user to identify the country, region, city, latitude, longitude, zip code, time zone, ISP, domain name, connection type, area code, weather station name, mobile, usage types, address type and IAB category by IP address.","archived":false,"fork":false,"pushed_at":"2024-01-03T06:51:29.000Z","size":967,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T23:11:13.713Z","etag":null,"topics":["c","city","country","geolocation","ip-address","ip-location","ip-lookup","ip2location","iplocation","ipv4","ipv6","isp","mod-ip2location","region"],"latest_commit_sha":null,"homepage":"https://www.ip2location.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chrislim2888.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-04-29T07:01:56.000Z","updated_at":"2024-01-03T06:51:32.000Z","dependencies_parsed_at":"2025-02-21T15:37:48.399Z","dependency_job_id":"1af0391a-eb4e-4316-9019-a4abd00d403c","html_url":"https://github.com/chrislim2888/IP2Location-Apache-Module","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-Apache-Module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-Apache-Module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-Apache-Module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrislim2888%2FIP2Location-Apache-Module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrislim2888","download_url":"https://codeload.github.com/chrislim2888/IP2Location-Apache-Module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675445,"owners_count":21143764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","city","country","geolocation","ip-address","ip-location","ip-lookup","ip2location","iplocation","ipv4","ipv6","isp","mod-ip2location","region"],"created_at":"2025-02-21T15:37:14.589Z","updated_at":"2025-04-13T06:43:17.901Z","avatar_url":"https://github.com/chrislim2888.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP2Location Apache Module 7.0.1\n\nThis is a IP2Location Apache Module that enables the user to find the country, region, city, latitude, longitude, \nzip code, time zone, ISP, domain name, connection type, area code, weather, mobile network, elevation, \nusage type, address type and IAB category by IP address or hostname originates from. The library reads the geo location information\nfrom **IP2Location BIN data** file.\n\nSupported IPv4 and IPv6 address.\n\nFor more details, please visit:\n[https://www.ip2location.com/developers/apache](https://www.ip2location.com/developers/apache)\n\n# Requirements\n1. IP2Location C API library ( download from https://www.ip2location.com/developers/c )\n2. Apache 2.0x\n3. GNU make or any compatible make utility\n\n# Installation\n### Linux Build\nDepending on installed Apache devel, APXS is either as \"apxs\" or \"apxs2\" available\n\n1) apxs -i -a -L\u003cpath_to_ip2location_c_api_compiled_library\u003e -I\u003cpath_to_ip2location_c_api_src\u003e -lIP2Location -c mod_ip2location.c\n\te.g. apxs -i -a -L ../ip2location-c-7.0.1/libIP2Location/ -I ../ip2location-c-7.0.1/libIP2Location/ -l IP2Location -c mod_ip2location.c\n \n### Windows Build\n1. open Makefile.win and configure macros as below:  \n`IP2LOCATION_CSRC_PATH = \u003cpath_to_ip2location_c_api_src\u003e`  \ne.g. `IP2LOCATION_CSRC_PATH = ../C-IP2Location-5.0.0/libIP2Location`  \n  \n`IP2LOCATION_CLIB_PATH = \u003cpath_to_ip2location_c_api_compiled_library\u003e`  \ne.g. `IP2LOCATION_CLIB_PATH = ../C-IP2Location-5.0.0/libIP2Location`  \n  \n`APACHE_INSTALL_PATH   = \u003cpath_to_apache_installation\u003e`  \ne.g. `APACHE_INSTALL_PATH   = \"C:/Program Files/Apache Group/Apache2\"`  \n\n2. nmake /f Makefile.win\n3. copy the resulting IP2Location_apache.dll to Apache modules path\n\n# Apache Configuration\n1. load the compiled IP2Location module by adding these lines in httpd.conf  \n  \n    `LoadModule IP2Location_module \u003ccompiled_ip2location_dll_file_with_fully_qualified_path\u003e`  \n    `\u003cIfModule mod_ip2location.c\u003e`  \n    `IP2LocationEnable \u003cOn|Off\u003e`  \n    `# ENV will set server variables`  \n    `# NOTES will set apache notes`  \n    `# ALL will set both`  \n    `IP2LocationSetmode \u003cALL|ENV|NOTES\u003e`  \n    `IP2LocationDBFile \u003cip2location_binary_db_file_with_fully_qualified_path\u003e`  \n    `IP2LocationDetectProxy \u003cOn|Off\u003e`  \n    `\u003c/IfModule\u003e`  \n\n2. restart Apache server to take effect of the changes\n\n# Testing\n### PHP Testing\nfrom internet browser, load mod_ip2location_test.php\n\n### Apache Rewrite Testing\n1. add below lines to Apache configuration file httpd.conf:\n    `RewriteEngine On`  \n    `RewriteCond %{ENV:IP2LOCATION_COUNTRY_SHORT} ^UK$`  \n    `RewriteRule ^(.*)$ http://www.google.co.uk [L]`  \n2. this will redirect all ip address from United Kingdom to http://www.google.co.uk\n\n\n# Sample BIN Databases\n* Download free IP2Location LITE databases at [https://lite.ip2location.com](https://lite.ip2location.com)  \n* Download IP2Location sample databases at [https://www.ip2location.com/developers](https://www.ip2location.com/developers)\n\n\n# IPv4 BIN vs IPv6 BIN\n* Use the IPv4 BIN file if you just need to query IPv4 addresses.\n* Use the IPv6 BIN file if you need to query BOTH IPv4 and IPv6 addresses.\n\n\n# Support\nEmail: support@ip2location.com.  \nURL: [https://www.ip2location.com](https://www.ip2location.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrislim2888%2Fip2location-apache-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrislim2888%2Fip2location-apache-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrislim2888%2Fip2location-apache-module/lists"}