Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 20th, 2001, 06:33 AM
PsykBryt PsykBryt is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Posts: 15 PsykBryt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Configuring htaccess

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!!!

Reply With Quote
  #2  
Old December 20th, 2001, 09:35 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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!

Reply With Quote
  #3  
Old December 20th, 2001, 12:49 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #4  
Old December 20th, 2001, 01:24 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 18
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
.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:
AuthUserFile "c:/apache/.htpasswd"
AuthName "private zone"
AuthType Basic

<Limit GET POST>
require user PsykBryt
</Limit>

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:
admins: PsykBryt some1else me you him

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.

Reply With Quote
  #5  
Old December 20th, 2001, 02:28 PM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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

Reply With Quote
  #6  
Old December 20th, 2001, 03:06 PM
mezz mezz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 310 mezz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
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.

Reply With Quote
  #7  
Old December 20th, 2001, 04:20 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 18
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
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.

Reply With Quote
  #8  
Old December 20th, 2001, 04:24 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 18
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
And yeah, mezz, that time .htacces didn't work for me because I messed up with my path to .htpasswd

Reply With Quote
  #9  
Old December 21st, 2001, 12:43 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
no problem Al

Reply With Quote
  #10  
Old December 21st, 2001, 02:44 AM
PsykBryt PsykBryt is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2001
Posts: 15 PsykBryt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #11  
Old December 21st, 2001, 04:16 AM
pippo's Avatar
pippo pippo is offline
A PAtCHy sErver
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Italy
Posts: 410 pippo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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

Reply With Quote
  #12  
Old December 21st, 2001, 09:41 AM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 18
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Configuring htaccess


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |