Access based on IP or password

#1
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?
 

Pong

Administrator
Staff member
#2
are you on a cpanel server? or LSWS native environment?

You can setup password protection, or ip restriction, but you may not set condition for password protection, even allowed IP will need username and password once it is set.
 
#3
are you on a cpanel server? or LSWS native environment?

You can setup password protection, or ip restriction, but you may not set condition for password protection, even allowed IP will need username and password once it is set.
I’m on LSWS native.

will putting the access in the graces file work.

I know you can do this with apache

AuthType Basic
AuthUserFile /www/.site_htpasswd
AuthName "Protected Area"

<RequireAny>
Require ip 1.2.3.4
Require valid-user
</RequireAny>
 

Pong

Administrator
Staff member
#4
yes, it should work in .htaccess. LSWS will act the similar way as apache. require directives should work
 
Top