| Welcome to Webforumz.com. |
|
Apr 3rd, 2007, 13:38
|
#1 (permalink)
|
|
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 26
Posts: 135
|
htaccess password prob
having a problem trying to get it working. i have my htaccess file in my public folder and my htpasswd file in the protected folder however i keep getting a 500 internall error?
.htaccess
- Code: Select all
AuthUserFile /root/public_html/hidden data/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
require user wsabstract
.htpasswd
- Code: Select all
wsabstract:password
what am i missing?
__________________
|
|
|
Apr 3rd, 2007, 19:15
|
#2 (permalink)
|
|
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 26
Posts: 135
|
Re: htaccess password prob
any thoughts?
__________________
|
|
|
Apr 4th, 2007, 15:14
|
#3 (permalink)
|
|
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,319
|
Re: htaccess password prob
Your last line in the .htaccess file; I just use:
- Code: Select all
Require valid-user
You can then list your 'user-password' pairs in your .htpasswd file
Is your password coded into md5 format? If not, that is propably your problem.
__________________
Regards
Geoff
|
|
|
Apr 4th, 2007, 15:48
|
#4 (permalink)
|
|
Reputable Member
Join Date: Dec 2005
Location: scotland
Age: 26
Posts: 135
|
Re: htaccess password prob
gave up on it, just created a simple php login script. don't think it was in md5 format. i'll check that out. Thanks 
__________________
|
|
|
Apr 8th, 2007, 20:39
|
#5 (permalink)
|
|
Reputable Member
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 294
|
Re: htaccess password prob
Quote:
Originally Posted by karloff
having a problem trying to get it working. i have my htaccess file in my public folder and my htpasswd file in the protected folder however i keep getting a 500 internall error?
|
If you have a look at the Apache error log, it should give you more details of what caused the "500". The "500 internal error" message is intentionally very bland and lacking in information so that users to a broken website aren't given too many cluse as to how to hack it, and the extra detail that the programmer needs to fix problems is made available to him/her throught the error logs 
|
|
|
Jul 3rd, 2007, 15:21
|
#6 (permalink)
|
|
Reputable Member
Join Date: Jul 2007
Location: France
Posts: 101
|
Re: htaccess password prob
Is your user really 'wsabstract' as found in tutorials?
Secondly, the path to your .htpasswd file has to be your server path, not domain path, AND your directory name has a space in it. May be worth checking both if you haven't already sorted it.
|
|
|
Jul 27th, 2007, 08:33
|
#7 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: htaccess password prob
No solution guys...?
ahh...cammon...!!!
Just a tought! I am using a free Domain to upload my own small website for personal use. You guys are talking about this server path... So how am I going to know my server path if I am going to use this .htaccess in my site?
Here is my sample image of how my folder management in the domain file manager.
[ FolderTree ]
Thanks.
__________________
Last edited by Monie; Jul 27th, 2007 at 08:49.
Reason: Adding image attachment
|
|
|
Jul 27th, 2007, 09:15
|
#8 (permalink)
|
|
Reputable Member
Join Date: Jul 2007
Location: France
Posts: 101
|
Re: htaccess password prob
For example, you should have in .htaccess:
AuthUserFile e.g. /homepages/34/accountnumber/_hiddendirectory/pw_file
or some such.
/homepages/34/accountnumber or whatever, is your website path on the host's server. Somewhere in the help documentation with your hosting provider they will give you the server path for your site. If not, email them.
Hope that helps.
__________________
DR400-140B Dauphin, 5.3 litre 160hp Textron-Lycoming O320 D2A flat 4, 130kt cruise, range 825km, 4 seats
|
|
|
Jul 28th, 2007, 01:30
|
#9 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: htaccess password prob
Ok I found it..
But the server path of my site begin with a harddisk directory something like:
- Code: Select all
c:/sites/content/m/o/n/moniesblog
So I will put it like this in my htaccess file?
- Code: Select all
AuthUserFile c:/sites/content/m/o/n/moniesblog/.htpasswd
If this is true, then I should save my .htaccess file into whichever folder that I want to protect, am I right so far?
What about the htpasswd file(that contain the username and the encrypted password)? Where am I supposed to put it? Is it in my moniesblog directory or in some other specific folder?
Thanks..
__________________
|
|
|
Jul 28th, 2007, 08:41
|
#10 (permalink)
|
|
Reputable Member
Join Date: Jul 2007
Location: France
Posts: 101
|
Re: htaccess password prob
Are you running from a local server i.e. on your home computer, or a web host? Unusual for a web host to have an absolute path beginning with c:/...
Anyway, the .htaccess file goes in the directory you are trying to protect. The .htaccess file contains the path to your (hidden) .htpasswd file. The password file can go anywhere - just make sure it's hidden.
Hope that helps.
__________________
DR400-140B Dauphin, 5.3 litre 160hp Textron-Lycoming O320 D2A flat 4, 130kt cruise, range 825km, 4 seats
|
|
|
Jul 30th, 2007, 01:14
|
#11 (permalink)
|
|
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,567
|
Re: htaccess password prob
Thanks matelot..
I am actually using a free web host.
After checking with my web host, they said that free account does not support "htaccess".
Hemmm.... can you suggest me any free web host out there that support htaccess.
I am developing my personal website at the beginning stage, after it's complete, then I will think about buying a cheap domain.
Thanks again.
__________________
|
|
|
| Thread Tools |
|
|
| 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
HTML code is Off
|
|
|
|
|
|