Having annoying problems with .htaccess and .htpasswd
The biggest problem is I don't know how to use them!
I've worked through a few tutorials via google, explaining how to use the files and none of it has worked. They all related to using them with Apache (yes, I have it installed and working!)
Here's what I have:
FREESCO 0.3.8
Apache 1.3.27
I have a new directory at /www/secure
which contains a few files including "index.htm" & "test.htm".
All the files work as expected, ie. images, etc
I have placed my .htpasswd & .htaccess in several places (according to various tutorials) and have yet to see any "Password" boxes appear!
I have had no errors and htpasswd did create files and the file did contain username and encrypted passwords. I just don't know what else I need to do and none of the tutorials mentioned anything else other than creating the files and occasionally using chmod on the files.
The most common .htaccess file was:
- Code: Select all
AuthUserFile /www/secure/.htpasswd
AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthType Basic
require valid-user
Is there a tutorial that works for Apache on FREESCO? Or is there something all these tutorials is missing?
This is my biggest problem with *nix in general, not all tutorials work with all distros. Tho my biggest hate is when someone says use "this" command and all I get is "this is not a recognised file or command" THEN you find out that you have to mess around with paths,config files, blah blah blah.
So anyway, back to my problem... can anyone help or point to tutorial, etc...
My guess it's all down to the path in the .htaccess file? It's not clear whether it uses "/www/secure/.htaccess" or "/mnt/bootdev/etc...." or something entirely different!
Everyone of them mentions using "pwd" to get the path and it's always "/mnt/bootdev/blah/blah/www/secure/" and that's what I've been using mostly, but I have tried "/www/secure/".
Sorry for ranting on, but it's 2am and I've been tring to get it to work for 3+ hours.
Thanks in advance,
Alan.