0

I'm using mod_geoip for filtr some traffic. So now I have e.g. this

SetEnvIf GEOIP_COUNTRY_CODE FR AllowCountry
<Locationmatch "/secure-by-country">
Deny from all
Allow from env=AllowCountry
</..

But now I need add http auth. for blocked countries. So:

if IP is not from env=AllowCountry show http auth and if client send valid credentian allow access.

It is possible? How I can mix Locationmatch & Mod_geoip with some type of IF?

Thanks a lot

Pavel
  • 397
  • 6
  • 16

1 Answers1

0

I have it:) - Allow and require must be in valid order

<Locationmatch "/secure-by-country">
AuthName "Secure area"
AuthType Basic
AuthUserFile /var/.../.htpasswd
AuthGroupFile /dev/null
Satisfy any
Deny from all
Allow from env=AllowCountry
require valid-user
</Locationmatch>
Pavel
  • 397
  • 6
  • 16