Answer the question
In order to leave comments, you need to log in
How to implement this through apache?
Is it possible to block access to the site for everyone, except for certain ip ranges. And for those who fit the ranges, offer to enter a login-password? Figured out how. Is it possible to do everything together?
Answer the question
In order to leave comments, you need to log in
Realized
If the IP is suitable, we display the authorization window. If not suitable, we write that access is blocked.
<If "-R '290.111.222.0/20'"> #Вот он айпишник
AuthType Basic
AuthName ""
AuthUserFile .htpasswd #Нужно прописать правильный путь к файлу с логином и паролем
Require valid-user
</If>
<Else>
Require all denied
</Else>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question