logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Deny not allowed here, mode_geoip & Apache 2.4
Author
sambache



Joined: 11 Feb 2014
Posts: 11

PostPosted: Fri 07 Mar '14 20:05    Post subject: Deny not allowed here, mode_geoip & Apache 2.4 Reply with quote

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

PostPosted: Sat 08 Mar '14 8:15    Post subject: Reply with quote

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


Reply to topic   Topic: Deny not allowed here, mode_geoip & Apache 2.4 View previous topic :: View next topic
Post new topic   Forum Index -> Apache