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 February 16th, 2002, 06:22 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
Question Apache .htpasswd login

Ok, I finnaly understood how to do eveything. I added .htaccess with this output...

AuthUserFile /htdocs/db/.htpasswd
AuthName "This is a private folder on Chad's Server. Please input name and password."
AuthType Basic
require valid-user


And then I opened the CMD Prompt and went to my apache/bin folder. And I typed in:
htpasswd -c .htpasswd chad

then it asked for my password, I typed it in, then I confirmed it (typed it again). And when I got to the /db/ folder it asks for my name/pass, I type it in and it says wrong, password? What's wrong? I also tried typing in
htpasswd -b -c .htpasswd chad pass

and that didn't work either. Does anyone know how to fix this?

Reply With Quote
  #2  
Old February 16th, 2002, 06:37 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
It should be
<Limit GET>
require user chad
</Limit>
so as you see you have to mistakes, one you require different user and two you dont have limit. Make sure you moved .htpasswd too
__________________
And you know I mean that.

Reply With Quote
  #3  
Old February 16th, 2002, 07:07 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
I did move the .htpasswd and I added the limit thing. It still says incorrect password. Here is my two files.
______________
.htaccess
-----------------------
AuthUserFile /htdocs/db/.htpasswd
AuthName "This is a private folder on Chad's Server. Please input name and password!"
AuthType Basic
<Limit GET>
require user chad
</Limit>
--------------------------
.htpasswd
--------------------------
chad:$apr1$2T2.....$S08ZBlYYEmp3xyHtaH9ey.
--------------------------

And they are both in the /db/ folder. Do you see anything wrong with the code?

Reply With Quote
  #4  
Old February 16th, 2002, 07:12 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
Well, last line of .htpasswd should be blank line, but you probably just left it out. Is htdocs really mounted to the root? Try to put full path from root to .htpasswd

Reply With Quote
  #5  
Old February 16th, 2002, 07:18 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
Well this is the full path...
C:\program files\apace group\apache\htdocs\db\.htpasswd

I've tried that, taken off C:\, witched \'s with /'s, and anything I put behind /apache group, it gets a 500 error. How would I write out the full path?

Reply With Quote
  #6  
Old February 16th, 2002, 07:41 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
Oh, and htdocs is the root directory.

Reply With Quote
  #7  
Old February 17th, 2002, 02:58 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
>>. How would I write out the full path?

double quote it:

"C:\program files\apace group\apache\htdocs\db\.htpasswd"

>> <Limit GET>
>> require user chad
>> </Limit>

If you do not have special reasons to allow other methods remove the Limit directive,
for default all methods are "limited".
__________________
My article: mod_rewrite: No More Endless Loops!

Last edited by pippo : February 17th, 2002 at 03:01 AM.

Reply With Quote
  #8  
Old February 17th, 2002, 11:03 AM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
That did the trick, it works now, thanks a lot.

Reply With Quote
  #9  
Old February 17th, 2002, 06:23 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
Uh Oh

I had to reinstall Apache, so I did all the steps above again...
.htaccess file...

AuthUserFile "C:\Apace Group\Apache\htdocs\db\.htpasswd"
AuthName "This is a private folder"
AuthType Basic
<Limit GET>
require user chad
</Limit>

and .htpasswd file...

chad:$apr1$JT5.....$VnWsyNTSaZi2tXtO.wJ660

they are both in directory /db/ and when I go to that directory it doesn't prompt me for my name and password. I've tried taking off the limit part and that didn't help either. Do you see something wrong with my code?

Reply With Quote
  #10  
Old February 17th, 2002, 06:29 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
In .conf file, default value for AllowOverride is none, you should go and set to all (at least for home dev)

edit: forgot to mention it is in
<Directory "C:/Apace Group/Apache/htdocs">
....
</Directory>

Last edited by AlCapone : February 17th, 2002 at 06:31 PM.

Reply With Quote
  #11  
Old February 17th, 2002, 06:39 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
I changed it to All and the it prompted for my name/pass but it kept getting incorrect password, so I created the .htpasswd file again, but now it won't prompt for the name/pass.

Reply With Quote
  #12  
Old February 17th, 2002, 07:06 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
I did however make one change after I installed Apache, I added virtual host. But that wouldn't change anything would it?

Reply With Quote
  #13  
Old February 17th, 2002, 08:04 PM
Chad87 Chad87 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: USA
Posts: 21 Chad87 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Chad87 Send a message via AIM to Chad87 Send a message via Yahoo to Chad87
well I somehow figured it outmyself...
I tried putting in a different password and it worked.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Apache .htpasswd login


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