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: Deny not allowed here, mode_geoip & Apache 2.4 |
|
Author |
|
sambache
Joined: 11 Feb 2014 Posts: 11
|
Posted: Fri 07 Mar '14 20:05 Post subject: Deny not allowed here, mode_geoip & Apache 2.4 |
|
|
Hello all,
still new to apache and working my way through. Like to use mode_geoip to block certain countries.
The module tries to load but when running httpd -S I get an error saying Deny not allowed here.
Blocking server wide I have the following in httpd.conf
<IfModule geoip_module>
GeoIPEnable On
# Specify full path to the database here
# File and Caching Directives
# Use only one database
GeoIPDBFile C:/apache24/bin/GeoIP.dat MemoryCache
GeoIPOutput Env
# Blocking a client based on country
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry
# Blocking a client based on continent
SetEnvIf GEOIP_CONTINENT_CODE AF BlockContinent
SetEnvIf GEOIP_CONTINENT_CODE AS BlockContinent
SetEnvIf GEOIP_CONTINENT_CODE SA BlockContinent
Deny from env=BlockCountry
</IfModule>
Changing Deny from to Require all denied gave me the same error, just saying Require all not allowed
What I am doing wrong or missing here ?
If one of you could helpl me out, would be awesome.
Thank you
Johannes |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sat 08 Mar '14 8:15 Post subject: |
|
|
order, allow, deny, require and satisfy and not allowed in a global context. Only inside <Directory> or .htaccess files.
See the "Context" in the box at the top of each of these directives in the docs. |
|
Back to top |
|
|
|
|
|
|