D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] .htaccess - Resolved !!!



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All you need is:
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /home/neil/users
Require valid-user

Notes:
1. I don't think the .htpasswd filename is a good idea (make sure this is ABOVE the top level of the website, if the website is /home/neil/public_html/ the above is OK). Rename the file as above.

This was done as per the apache documentation !


2. I don't know if the capitalisation of Require is essential, but the other part is the construct 'valid-user' rather than 'user guest'.

See above


3. Make sure you CLOSE the BROWSER and restart apache (under Debian) httpd (under RH/Mdk) before re-testing the authorisation, everytime.

Why should this matter ?


4. Make sure that the path to the users file is readable by the apache user. (As Alex advised).

Did that


5. Make sure that the .htaccess file is in the directory that it relates to, not the one above or one below.

Sure was...


However as per a suggestion by our mate Mr Walker, I went through the
modules, looking to comment out anything related to authorization and
noted the presence of the sys_auth_module module... removed it and guess what people ?


IT WORKS :-D

God only knows why that is not documented anywhere...

I now have access control :-) yay !! next.. on to digest authorization... (should be easy to convert)

Neil
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE+JF/7ETbMU8Wu6mERAr60AJ9rWgnd8ELnSfE1lkDNhYf/vNStswCdFILJ
I5C+ujBymfnEQYlnhwHEHAY=
=59id
-----END PGP SIGNATURE-----


-- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.


Lynx friendly