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

1 Answer 1

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.