LSWS native Access question

#1
Hello,
I’m trying to set up access to a private park of my site.
ive managed to set up so that it asks for the username and password when going to the are but I want to whitelist some IP address so that if someone visits from there it lets them straight in without the username or password.
how do I set up the context do allow this to happen?
 

serpent_driver

Well-Known Member
#2
1. Create .htpasswd outside of public_html
Code:
htpasswd -c /path/to/password_file/.htpasswd user1
htpasswd /path/to/password_file/.htpasswd user2
htpasswd /path/to/password_file/.htpasswd user3
....
2. Modify root .htaccess
Apache config:
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /path/to/password_file/.htpasswd
Require valid-user

<RequireAll>
    Require ip 123.456.789.000
    Require ip 111.222.333.444
    Require valid-user
</RequireAll>
 
Top