Author |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Mon 12 Jul '10 10:04 Post subject: mod_geoip on Windows |
|
|
Hello
I need to use mod_geoip http://www.maxmind.com/app/mod_geoip#block module to rewrite site requests to different leanguage site version. My Apache runs on Win2k3 server. Is there any way to make it work on windows ?
Maybe there is other way to do this ?
What I need is rewrites from mod_rewrite module for every request to my main page with IP country recognition. I will prepare three leanguage version of my site (danish, polish and english). If request comes from danish IP address it should be rewritten to www.myhost.com/dk/ (this will be site version in danish for danish IP addresses) same for polish www.myhost.com/pl/ (for polish IP addresses) and for english (all other IPs). Additionally i would like to keep mod_geoip feature which allows to block request from certain countries (f.x. China, Russia etc.). |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Mon 12 Jul '10 12:49 Post subject: |
|
|
For languages there is multiviews.
http://httpd.apache.org/docs/2.2/content-negotiation.html
The difference would be a English browser in Denmark will get English pages.
A Polish browser in Indonesia would get the Polish pages.
I like the module even with its occasional error that throws a 403.
With the CityLite DB it give decent info as environment variables;
_SERVER["GEOIP_CONTINENT_CODE"] NA
_SERVER["GEOIP_COUNTRY_CODE"] US
_SERVER["GEOIP_COUNTRY_NAME"] United States
_SERVER["GEOIP_REGION"] CA
_SERVER["GEOIP_REGION_NAME"] California
_SERVER["GEOIP_CITY"] Beaumont |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Mon 12 Jul '10 13:12 Post subject: |
|
|
Thanks for your answer but what i need is URI change couse of google positioning. As I know this is the best way to site positioning in different leanguages. That's why i need to configure apache in this way - to make a different rewrites for different page visitors. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Mon 12 Jul '10 15:41 Post subject: |
|
|
That's fine. Docs say you can use environment variables for rewriting, there's the list of them when using the geoip module. |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Tue 13 Jul '10 9:28 Post subject: |
|
|
glsmith wrote: | That's fine. Docs say you can use environment variables for rewriting, there's the list of them when using the geoip module. |
mod_geoip is not available for windows so how can i use environment variables of this module ?
maybe there is some possibility to compile this module for windows from linux sources ? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 13 Jul '10 9:35 Post subject: |
|
|
where did you get Apache? Apache.org, here, elsewhere? This will determine which one I point you too. |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Tue 13 Jul '10 10:07 Post subject: |
|
|
glsmith wrote: | where did you get Apache? Apache.org, here, elsewhere? This will determine which one I point you too. |
From apachelounge.com |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 13 Jul '10 10:17 Post subject: |
|
|
Apache Haus has what you want
www.apachehaus.com |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Tue 13 Jul '10 13:30 Post subject: |
|
|
OMG THIS IS WHAT I NEED - THANKS !!!!!! <dancing>
They need to reconsider google positioning |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Tue 13 Jul '10 14:40 Post subject: |
|
|
Qmpeltaty wrote: | glsmith wrote: | where did you get Apache? Apache.org, here, elsewhere? This will determine which one I point you too. |
From apachelounge.com |
Now i realized that my apache install comes from httpd.apache.org. Does it make any difference regarding to my mod_geoip thing ? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Tue 13 Jul '10 18:15 Post subject: |
|
|
Yes, things built with VC9 do not always work well in Apache built on VC6, sometimes they do sometimes they do not. mod_geoip seems to be one that does not. So in this case now you have two choices,
as far as google positioning I agree, third page in seems unfair, especially with the keywords I used.
Edit: Updated link
Edit 2: removed dead link as I no longer have any vc6 built modules.
Last edited by glsmith on Sat 02 Sep '17 2:04; edited 4 times in total |
|
Back to top |
|
Qmpeltaty
Joined: 06 Feb 2008 Posts: 182 Location: Poland
|
Posted: Wed 14 Jul '10 0:07 Post subject: |
|
|
Which one is better for my installation ? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Wed 14 Jul '10 0:22 Post subject: |
|
|
as far as I know they are the same. Both were built with VC6 which is what the apache.org distribution is built with. |
|
Back to top |
|
Schyzophrenic
Joined: 29 Jul 2012 Posts: 1
|
Posted: Sun 29 Jul '12 22:30 Post subject: |
|
|
Thanks for all the information here. I got the apache module without any issue, but I can't find the C library compiled for windows 7 64bits anywhere.
This is getting pretty hard to install, anyone would have an idea of where I could get it ?
Thanks again for your help, it is pretty hard to find information on this... |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Mon 30 Jul '12 21:06 Post subject: |
|
|
Why do you need the C library? It's statically compiled into the module, at least the modules at Apache Haus |
|
Back to top |
|