[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache-www-pages protection?



virtanen wrote:

> as a newbie for running apache I wanted to know an easy method to give
> access to certain web-pages for restricted selected users only (using
> passwords).
>
> hvirtane@cc.jyu.fi
>
>
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null

The apache documentation has the answer for this question in ther FAQ at
www.apache.org

here is and example .htaccess for your ease... but please read and re-read the apache
documentation itis very thoruogh and it covers more seriuos security issues than what
i porpose to you today.

//////////////////// begin .htaccess remiove comments when you implement
//////////////////////

AuthUserFile   /usr/home/jeftep/gamesigpasswd  #path to password file created by
htpasswd
AuthName       "!leave if you don't belong!" # jsuta label
AuthType       Basic

<Limit GET POST PUT>
allow from .domain.com # allow from selected domain can be a subset of an i[p sucha
as 192.168
require valid-user # if noit from that domain ask for a password
satisfy any # anyhting will make me happy and let you look atthe pages
</Limit>

//////////////////////// end //////////////////////////////////

remeber you web server has to be configured to allow authorization override on
.htaccess files and then just drop this inside the dir you want to protect

remeberto read teh manual and the FAQ.
begin:vcard 
n:Bardin;Jon
x-mozilla-html:FALSE
adr:;;;;;;
version:2.1
email;internet:jbardin@imagelinks.com
note:www.gamesig.com -uniting the linux gaming community
x-mozilla-cpt:;0
fn:Jon Bardin
end:vcard

Reply to: