Pages: Previous12
Current Page: 2 of 2
Re: Restrictions - Rights - Privileges
Posted by: Reneheijnen (---.adsl.wanadoo.nl)
Date: June 09, 2009 11:38PM

stevenmartin99 Wrote:
-------------------------------------------------------
> yes that is encyption of test
>
>
> so u just type in test and it will log in-
> it uses the md5 sum to encrypt it.

Ye sorry for not being more clear, what i ment was - Test is not the password. the encrypted version of test is ''95x74hLDQKXI2''

Options: ReplyQuote
Re: Restrictions - Rights - Privileges
Posted by: toumimi (---.84.114-78.rev.gaoland.net)
Date: June 10, 2009 12:59AM

Just to finish with a complete solution :

    - Create a folder protect outside of your www folder

    - Create a file named .htpasswd into protect folder

    Add valid users in it, as user:md5_password (example here : user test / password beta)
    => Use this to generate one line : [aspirine.org])
    Remember : You must place only one user:password per line

    test:$apr1$IEbc5CFH$nuCPerNecAEolN2n/NpKV.

    - Create a file named .htgroup into protect folder

    Add valid groups in it, as group1:user1 user2...
    Remember : You must place only one group:users per line

    friends:test

    - Create a file named .htaccess into desired folder

AuthUserFile D:\wamp\protect\.htpasswd
AuthGroupFile D:\wamp\protect\.htgroup
AuthType Basic
AuthName "Restricted Area"
Require group friends

Order Deny,Allow
Deny from all
Allow from 127.0.0.1

Satisfy Any

Using this structure, you can easily add others users, but only those in friends group will be able to access your homepage...
You can also use groups if you want to restrict parts in www folders (with another .htaccess for example).

Hope it will be useful...

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote
Pages: Previous12
Current Page: 2 of 2


Sorry, only registered users may post in this forum.