Apache and password protection help needed

Associate
Joined
18 Oct 2002
Posts
710
Location
Somerset
I recently set up apache on a system and after a bit of huffing and puffing and some help on here got it outputting what i wanted to the world (well to a few friends that need it anyway)

Now what i have running on the apache server (installed on a windows XP machine) is only for a few people to see, but it really makes no odds if every user on the net was to stubble across it so it is fine as it is.

But now i have added a new directory that is holding files for these users to download.

I dont want the entire world downloading or even uploading stuff to and from this directory so i had an attemp at setting up .htpasswd and .htaccess files but they are not working, i am getting no password box when accessing the pages.

I have noting like cpanel which i have read much about as apache is running on a PC belonging to me not a host some where, should i have something like capnel installed?

Also i have taken a cmd line to the apache htdocs directory and used htpasswd -c something but that is retuning not recognised command.

So i ended up creating the files from an online place and copying them into my directorys,

I think some of the problem could be to do with the line in the access file telling it where the password file is located.

c:/program files/apache group/ apache2
is where apache is installed

then inside that
/htdocs
is where all the web content goes

I have created another folder at that level, so
apache2/passwords
is where the passwrod file is located.

i have told the access file to look at
c:/program files/etc/etc/etc

i think that is wrong but do not know what to tell it?

Thanks
 
Well problem solved, and to me with what seems to be a much better option than using .htpasswd and .htaccess

Create a password file in a folder outside te root, then add a <directory> section to the main config file with essentially the info that would other wise go in the .htaccess file.
Nice an easy, no need for .htaccess files all over the place.

As for the cpanel or alternatives would still be interested if any one has views on anything like that?
Although i have read that cpanel needs to be installed on a clean server rather than one that has files/pages in it already.
 
Back
Top Bottom