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 !



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

On Monday 13 Jan 2003 6:35 pm, Neil Stone wrote:
> Paul Weaver wrote:
> > On Monday 13 January 2003 9:44 am, Neil Stone scribbled:
> >>and in the .htaccess file i put the following
> >>
> >>         AuthType Basic
> >>         AuthName "Restricted Files"
> >>         AuthUserFile /home/neil/.htpasswd
> >>         require user guest

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.

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'.

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

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

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

- -- 

Neil Williams
=============
http://www.codehelp.co.uk
http://www.dclug.org.uk

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

iD8DBQE+JEEViAEJSii8s+MRAr/JAJ9VvP79fmeKTrp1OyqOaNO0lMLtqQCgjaL1
YqNLngtJyKeIrDifIyUKoxc=
=tV3Z
-----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