SunQuest
 
           Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old May 10th, 2003, 07:25 PM
chimchim chimchim is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: athens Georgia
Posts: 5 chimchim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
help with .htpasswd

hello all. i am a newbie apache user and am looking for some quick assistance with my httpd.conf file. I am trying to add a password list file and when I test the configuration file, I get an error saying:

'AuthUserFile takes 1-2 arguments, text file containg user IDs and passwords'

I have a file called .htpasswd in my Apache install directory with the user names and encrypted passwords....
the code looks like the following

userassword

AuthUserFile C:\Program Files\Apache Group\Apache2\passwd\ .htpasswd
AuthGroupFile C:\Program Files\Apache Group\
AuthName "The incredibly safe realm"
AuthType Basic
require valid-user

I am not using a Group file, just the .htpasswd file in the shown above code's directory......

What am I doing wrong?
Any help would be great!
Cheers!

Reply With Quote
  #2  
Old May 10th, 2003, 10:12 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
how did you create the .htpasswd file?

also in your httpd.conf file did you change this line to allow all like the code below.

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All


__________________
Apache Expert

Reply With Quote
  #3  
Old May 10th, 2003, 10:16 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
also you should use forward slashes instead of backward slashes

AuthName "My Secured Page"
AuthUserFile /blah/blah/.htpasswd
AuthType Basic
require valid-user


Reply With Quote
  #4  
Old May 10th, 2003, 10:24 PM
chimchim chimchim is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: athens Georgia
Posts: 5 chimchim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i just created a text file in notepad, typed in my code and named it .htpasswd.....i then put this plain text file in a folder under my apache2 default install directory (the same dir as htdocs) i changed the None parameter to All but I still get the same error
when i run the test configuration utility

Reply With Quote
  #5  
Old May 10th, 2003, 10:33 PM
chimchim chimchim is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: athens Georgia
Posts: 5 chimchim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i tried changing to forward slash and put in your code line by line....still same error. .htpasswd file is not working? here is my code in the .htpasswd file

$

user:encypted password

AuthUserFile C:\Program Files\Apache Group\Apache2\passwd\ .htpasswd
AuthGroupFile C:\Program Files\Apache Group\
AuthName "The incredibly safe realm"
AuthType Basic
require valid-user
$

maybe this helps?

Reply With Quote
  #6  
Old May 11th, 2003, 01:24 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Quote:
Originally posted by chimchim
i tried changing to forward slash and put in your code line by line....still same error. .htpasswd file is not working? here is my code in the .htpasswd file

$

user:encypted password

AuthUserFile C:\Program Files\Apache Group\Apache2\passwd\ .htpasswd
AuthGroupFile C:\Program Files\Apache Group\
AuthName "The incredibly safe realm"
AuthType Basic
require valid-user
$

maybe this helps?


post the code from your .htaccess file and your .htpasswd file?

i think you have all your info in the .htpasswd file when that file should only contain the username and the password.

another question, why do you have the $ signs in yoru script there?

Reply With Quote
  #7  
Old May 11th, 2003, 02:20 PM
chimchim chimchim is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: athens Georgia
Posts: 5 chimchim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i can't u/l the files b/c the forum says its an invalid file type though last time i checked these were text files so i don't know what is up with that....anyway, can i just email you my code instead of trying to post it?
thanks
nate

Reply With Quote
  #8  
Old May 11th, 2003, 02:35 PM
chimchim chimchim is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: athens Georgia
Posts: 5 chimchim User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i can't u/l the files b/c the forum says its an invalid file type though last time i checked these were text files so i don't know what is up with that....anyway, can i just email you my code instead of trying to post it?
thanks
nate

Reply With Quote
  #9  
Old May 11th, 2003, 02:53 PM
Vince Vince is offline
LordNitrous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: England
Posts: 137 Vince User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
jeesh I cant help because I dont really configure my Apache on my PC, but if you want to upload your file then compress it in .zip
__________________
You don't deserve to read my signature...yeah! That's it, keep walking...yeah walk away from me! That's it! Get out of my pub, you're barred!

Reply With Quote
  #10  
Old May 11th, 2003, 04:49 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Quote:
Originally posted by chimchim
i can't u/l the files b/c the forum says its an invalid file type though last time i checked these were text files so i don't know what is up with that....anyway, can i just email you my code instead of trying to post it?
thanks
nate



just copy the code in those files and just paste the text on here.

let me show you let me paste my htaccess file

my .htaccess file

PHP Code:
 RewriteEngine On
RewriteCond 
%{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^[url]http://[/url](www\.)?corvette-online [NC]
RewriteCond %{HTTP_REFERER} !^[url]http://[/url](www\.)?192.100.0.000 [NC]
RewriteCond %{HTTP_REFERER} !^[url]http://[/url](www\.)?corvette-online/.vetnet [NC]
#RewriteCond %{REQUEST_URI} !card\.gif$
#RewriteRule \.(gif|jpe?g)$ card.gif [L]
RewriteRule !403.shtml$ - [NC,F,L


see thats all you have to do

Reply With Quote
  #11  
Old May 11th, 2003, 04:54 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
ignore the <a href="http://" target="_blank">http://</a> in the file it's supposed to show up like this

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?corvette-online [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?192.100.0.00 [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?corvette-online/.vetnet [NC]
#RewriteCond %{REQUEST_URI} !card\.gif$
#RewriteRule \.(gif|jpe?g)$ card.gif [L]
RewriteRule !403\.shtml$ - [NC,F,L]

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > help with .htpasswd


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway