|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi!
I'm trying to protect a directory with htaccess. So I placed a .htaccess file in that directory but what is the path to .htpasswd and .htgroup? I have installed apache on c:\apache on a win2000. HELP!!! |
|
#2
|
||||
|
||||
|
htpasswd.exe is , following your path installation, under c:\apache\bin
about .htgroup, I do not know what is it.
__________________
My article: mod_rewrite: No More Endless Loops! |
|
#3
|
|||
|
|||
|
First off, I know nothing when it comes to Apache on win32.
>> what is the path to .htpasswd and .htgroup? You run htaccess.exe and specify where you want to store your .htpasswd. You can have .htaccess at c:\apache\htdocs\.htaccess and .htpasswd on another drive like so: e:\private\.htpasswd. |
|
#4
|
||||
|
||||
|
.htgroup simply is a number of usernames stuck together. So if you're going to use only few accounts in that dir you dont really have to bother with .htgroup
As freebsd said, go to your c:/apache/bin dir and run .htpasswd c:/apache/.htpasswd PsykBryt and it will prompt for your password. Do likewise for all users you want to have. Then just edit your .htpasswd to make it look something like this Quote:
that will ask for username whenever you access the 'secret' dir. Try putting in PsykBryt and your password, should work. As you see you dont even use .htgroup here, but if you did, it would look like Quote:
and you'll have to have passes for those guys in .htpasswd, and your .htaccess would have to have this ...blah blah <Limit GET POST> require group admins </Limit> Ask here if you did not understand something, I'll try to clearify things for ya.
__________________
And you know I mean that. |
|
#5
|
||||
|
||||
|
Al
>>As freebsd said, go to your c:/apache/bin dir and run .htpasswd c:/apache/.htpasswd PsykBryt he did not say that. Under win32 (i have win98 and winnt at work) to build the password file you have to run htpasswd.exe >>Then just edit your .htpasswd to make it look something like this eventually he has to edit the .htaccess file as you said after |
|
#6
|
|||
|
|||
|
I already answered a little more detail at http://forums.devshed.com/showthrea...5787&forumid=15 .. Only thing that I didn't answer .htgroup , so do the search in google.com .. There have plenty of docs about those out there.
|
|
#7
|
||||
|
||||
|
pippo,
I agree that wasn't the exact wording, but freebsd said: >>You run htaccess.exe and specify where you want to store your .htpasswd and I just took liberty of translating that into my frase. Basicly all I did was specifying exact location and info to run, although now I see I was a little bit off, it should've been htpasswd -c c:/apache/.htpasswd PsykBryt (without leading . and wit -c if that is his first time creating the file) On windows system, you do not have to specify file extension if file is executable. I do not remember the exact order, but I'd guess it is .bat .com .exe (dont quote me on that though) thx for pointing that out though, we do not want PsykBryt to mess up right there because I added extra . in front of htpasswd and assumed he has already created that file. |
|
#8
|
||||
|
||||
|
And yeah, mezz, that time .htacces didn't work for me because I messed up with my path to .htpasswd
![]() |
|
#9
|
||||
|
||||
|
no problem Al
![]() |
|
#10
|
|||
|
|||
|
Thanks, guys! It's all up and running now! The thing was I had created the passwords using Unix and then I just copied it all to win32. So I had to use htpasswd and create new ones for my win32 apache.
And I hope I haven't caused any problems between AlCapone and Pippo... ![]() Last edited by PsykBryt : December 21st, 2001 at 03:02 AM. |
|
#11
|
||||
|
||||
|
do not worry no problem between me and AlCapone
,a problem did not ever exist! I really appreciated Al's answer, and I think he is a good tech guy. --pippo |
|
#12
|
||||
|
||||
|
No worries, PsykBryt, although there're handfull of guys on this forum who have problems with me, pippo is not one of them (as a matter of fact he is probably opposite to them
). thx pippo for good feedback. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > Configuring htaccess |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|