Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: VS18 mod_maxminddb.so and mod_ip2location |
|
| Author |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
Posted: Mon 18 May '26 21:46 Post subject: VS18 mod_maxminddb.so and mod_ip2location |
|
|
Does anyone have a compiled version of mod_maxminddb.so?
Compatible with the latest VS18 Apache version pls... |
|
| Back to top |
|
nono303

Joined: 20 Dec 2016 Posts: 230 Location: Lille, FR, EU
|
Posted: Tue 19 May '26 7:57 Post subject: |
|
|
Hi,
You can find mod_maxminddb 1.3.0.83 (bc24e6a 2026-05-14) vs18 x64 build here |
|
| Back to top |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
Posted: Tue 19 May '26 17:47 Post subject: |
|
|
I've downloaded both versions: vs18_x64-avx.zip and vs18_x64-avx2.zip
but this mod_maxminddb.so is NOT compatible with our Apache httpd-2.4.67-260504-Win64-VS18.
Other sugesstion? |
|
| Back to top |
|
timo
Joined: 03 Jun 2012 Posts: 49 Location: FI, EU
|
|
| Back to top |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
Posted: Wed 20 May '26 6:41 Post subject: |
|
|
Yes, I do that too. I also use the VS17 version but I was hoping someone had a good compatible VS18 version. It would be a nice addition to the existing Apache Lounge mods  |
|
| Back to top |
|
nono303

Joined: 20 Dec 2016 Posts: 230 Location: Lille, FR, EU
|
Posted: Wed 20 May '26 18:08 Post subject: |
|
|
| mod_maxminddb.so is linked with shared /bin/maxminddb.dll which must be in your path |
|
| Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3192 Location: Hilversum, NL, EU
|
|
| Back to top |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
Posted: Thu 21 May '26 16:18 Post subject: |
|
|
THX, testing the new mmdb.so file right now.
21-05 16:30h > looks good! THX for your file. Much appreciated! 
Last edited by RolfBos on Thu 21 May '26 16:26; edited 1 time in total |
|
| Back to top |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
|
| Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3192 Location: Hilversum, NL, EU
|
|
| Back to top |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
Posted: Sat 30 May '26 18:01 Post subject: |
|
|
Thank you very much for your IP2location file. I'm going to test it out right away. Much appreciated.  |
|
| Back to top |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
Posted: Sat 30 May '26 18:18 Post subject: |
|
|
Hi,
# --- security2 (mod_security2) ---
LoadModule security2_module modules/mod_security2.so
# --- MaxMindDB (mod_maxminddb) ---
LoadModule maxminddb_module modules/mod_maxminddb.so
# --- IP2Location (mod_ip2location) ---
# LoadModule IP2Location_module modules/mod_ip2location.so
The file is read by Apache VS18 without an error message. However, as soon as this ip2location file is loaded, all web pages on the server are blank.
<IfModule mod_ip2location.c>
IP2LocationDBFile f:/wamp/geoip/IP2LOCATION-LITE-DB11.BIN
IP2LocationDBFile f:/wamp/geoip/IP2LOCATION-LITE-ASN.BIN
IP2LocationEnable ON
IP2LocationDetectProxy ON
IP2LocationSetmode ALL
</IfModule>
<IfModule mod_ip2proxy.c>
IP2ProxyDBFile f:/wamp/geoip/IP2PROXY-LITE-PX12.BIN
IP2ProxyEnable ON
IP2ProxyDetectProxy ON
IP2ProxySetmode ALL
</IfModule>
Error:
Naam van toepassing met fout: httpd.exe, versie: 2.4.67.0, tijdstempel: 0x69f317e6
Naam van module met fout: mod_ip2location.so, versie: 0.0.0.0, tijdstempel: 0x6a15c4ce
Uitzonderingscode: 0xc0000005
Foutmarge: 0x0000000000001f93
Id van proces met fout: 0x5f1c
Starttijd van toepassing met fout: 0x01dcf0515fd02a42
Pad naar toepassing met fout: F:\wamp\apache\bin\httpd.exe
Pad naar module met fout: F:\wamp\Apache\modules\mod_ip2location.so
Rapport-id: 5b62eb1c-db54-4f02-98a4-2df7f3102ede
Volledige pakketnaam met fout:
Relatieve toepassings-id van pakket met fout:
Last edited by RolfBos on Sat 30 May '26 18:30; edited 1 time in total |
|
| Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 447 Location: UK
|
Posted: Sat 30 May '26 22:43 Post subject: |
|
|
As Steffen implied, we've been able to compile this ip2location module under VS18 against the HTTPD 2.4.67 build structure, but are unable to test it in detail.
Your post throws up a number of potential issues, which may explain why things are not behaving as you'd expect:
1) Your post details confirm you're running against WAMP binaries rather than those for the Apache Lounge build, against which these extra ip2location files were built.
2) Exception code: 0xc0000005 is an Access Violation, which in this situation rather suggest incompatible software components.
3) Your log shows you are also using mod_ip2proxy; another ip2location related module which we've not considered to date.
I'm not sure what to suggest here.
I could update the HowTo to add further code to build the ip2proxy module, but am not sure this will solve your problem.
I presume there are no errors reported in the log file, that would help. What happens if you up the LogLevel to debug? |
|
| Back to top |
|
RolfBos
Joined: 03 Mar 2026 Posts: 10 Location: Netherlands
|
Posted: Sun 31 May '26 1:00 Post subject: |
|
|
You are right, I made a mistake.
I am looking for a compiled version of mod_ip2proxy.so that is compatible with Apache Lounge v2.4.67-260504 VS18 Win64?
Does anyone have it or can anyone put it online?  |
|
| Back to top |
|
Otomatic

Joined: 01 Sep 2011 Posts: 328 Location: Paris, France, EU
|
Posted: Sun 31 May '26 11:52 Post subject: |
|
|
| tangent wrote: | | 1) Your post details confirm you're running against WAMP binaries rather than those for the Apache Lounge build, against which these extra ip2location files were built. |
Hi,
Wamp Apache is built using the Apache Lounge binaries.
The only difference is the contents of the httpd.conf file. |
|
| Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 447 Location: UK
|
Posted: Sun 31 May '26 14:52 Post subject: |
|
|
@Otomatic - My sincere apologies. I should have checked facts before posting.
@RolfBos - It would seem there are quite a few ip2location repositories on GitHub; somewhat difficult to follow.
Looking at https://github.com/ip2location/ip2proxy-c the code listed produces another library, plus an executable.
Believe that library is needed to link with the ip2proxy Apache module, found here https://github.com/ip2location/ip2proxy-apache.
Assuming these are what you need, I'll see if I can add them to the extra modules build HowTo. |
|
| Back to top |
|
Stray78

Joined: 15 Apr 2024 Posts: 63 Location: USA
|
Posted: Sun 31 May '26 19:40 Post subject: |
|
|
This is great! Even with a captcha I got tons of spam from my contact forms. Added a little code and countries can no longer see my contact form!
This is just with IP2Location. Obviously if they use a proxy they will still see it. |
|
| Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3192 Location: Hilversum, NL, EU
|
|
| Back to top |
|
tangent Moderator
Joined: 16 Aug 2020 Posts: 447 Location: UK
|
Posted: Tue 02 Jun '26 11:00 Post subject: |
|
|
@RolfBos - Using similar logic to that used for ip2location, we've been able to compile up the ip2proxy library and module files, as confirmed by Steffen's post with download links above.
Using the database files you've listed in your configuration (downloaded from https://www.ip2location.com/file-download), a test instance of Apache loads and runs, but as before I'm unable to test the GEO functionality for real.
@Stray78 - are you now able to add a suitable ip2proxy section to your Apache configuration?
What I did notice is that the order of the configuration settings is important. You need to enable the module before listing the required database file, viz:
| Code: | LoadModule IP2Location_module modules/mod_ip2location.so
LoadModule IP2Proxy_module modules/mod_ip2proxy.so
<IfModule mod_ip2location.c>
IP2LocationEnable ON
IP2LocationDetectProxy ON
IP2LocationSetmode ALL
IP2LocationDBFile "${SRVROOT}/conf/IP2LOCATION-LITE-DB11.BIN"
</IfModule>
<IfModule mod_ip2proxy.c>
IP2ProxyEnable ON
IP2ProxyDetectProxy ON
IP2ProxySetmode ALL
IP2ProxyDBFile "${SRVROOT}/conf/IP2PROXY-LITE-PX12.BIN"
</IfModule>
|
This is because the source code only opens the database file if the module is enabled, i.e.
| Code: | if(!config)
return NULL;
config->dbFile = apr_pstrdup(cmd->pool, dbFile);
if(config->enabled) {
config->ip2proxyObj = IP2Proxy_open(config->dbFile);
if(!config->ip2proxyObj)
return "Error opening dbFile!";
IP2Proxy_set_lookup_mode(config->ip2proxyObj, IP2PROXY_CACHE_MEMORY);
}
|
This caveat applies to both ip2location and ip2proxy.
I also note in your posted configuration above for ip2location lists two database files, and believe only the latter entry will be used.
Finally, although ip2location and ip2proxy include command line utilities to query the relevant database files, the code is POSIX based since it uses the getline() function, and as such won't compile under Windows. However, by adding a getline() function based on fgets(), these utilities seem to work ok, viz:
| Code: | C:\Apache24\bin>ip2location.exe -d C:\Apache24\conf\IP2LOCATION-LITE-DB11.BIN --ip 8.8.8.8
"ip","country_code","country_name","region_name","city_name","isp","latitude","longitude","domain","zip_code","time_zone","net_speed","idd_code", "area_code","weather_station_code","weather_station_name","mcc","mnc","mobile_brand","elevation","usage_type","address_type","category", "district","as_number","as_name","as_domain","as_usage_type","as_cidr"
"8.8.8.8","US","United States of America","California","Mountain View","N/A","37.386051","-122.083847","N/A","94035","-07:00","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","0.000000","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A","N/A"
C:\Apache24\bin>ip2proxy.exe -d C:\Apache24\conf\IP2PROXY-LITE-PX12.BIN --ip 192.111.137.37
"ip","is_proxy","proxy_type","country_code","country_name","region_name","city_name","isp", "domain","as_number","as_name","last_seen","threat","provider","fraud_score"
"192.111.137.37","1","PUB","US","United States of America","Georgia","Marietta","Performive LLC","performive.com","46562","Performive LLC","1","SPAM/SCANNER/BOTNET","-","99"
|
|
|
| Back to top |
|
|
|
|
|
|