#1  
Old 15th March 2008, 05:43
jva1601 jva1601 is offline
Junior Member
 
Join Date: May 2006
Posts: 12
Thanks: 0
Thanked 2 Times in 2 Posts
Default GeoIP directive in apache2

To add this to my apache2.conf what directive shall I enclose it in using the configuration below? Thank you!

GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat

SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
# ... place more countries here

Deny from env=BlockCountry

# Optional - use if you want to allow a specific IP address from the country you denied
# (See http://httpd.apache.org/docs/1.3/mod/mod_access.html for more details)
Allow from 10.1.2.
Reply With Quote
Sponsored Links
  #2  
Old 15th March 2008, 18:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
 
Default

Quote:
Originally Posted by jva1601
GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat
This goes into your global Apache configuration or in a vhost configuration if you need it for a special vhost only.

Quote:
Originally Posted by jva1601
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
# ... place more countries here

Deny from env=BlockCountry

# Optional - use if you want to allow a specific IP address from the country you denied
# (See http://httpd.apache.org/docs/1.3/mod/mod_access.html for more details)
Allow from 10.1.2.
Put this in a vhost configuration.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proftpd + MySQL virtual users, can't connect geekman HOWTO-Related Questions 28 27th September 2010 18:03
ServerAlias - how to specify Apache2 ServerAlias directive using ISPConfig Ripper Installation/Configuration 4 9th October 2008 23:04
SSI with Apache2 on Debian jchaven Server Operation 7 25th August 2008 17:06
Can't start apache Musty Server Operation 12 9th March 2008 13:58
apache2 not really running blackflag Installation/Configuration 4 9th May 2006 07:50


All times are GMT +2. The time now is 08:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.