Re: Apache-www-pages protection... now working
On Thu, 27 Jul 2000 jbardin@imagelinks.com wrote:
> 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
___________________________________________________________________________
> 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>
___________________________
It was really hard to find, what was wrong. The FAQ was not very helpful.
I had tried many times to write this .htaccess file and creating passwords
as well, but I did not know that:
********************************************
I had to change in
/etc/apache/htaccess.conf
the line:
AllowOverride None
for the line:
AllowOverride All
********************************************
and stop and start the apache server...
Now it is done and working.
Thanks all.
hvirtane@cc.jyu.fi
Reply to: