View Full Version : .htpasswd
historyrocks
6-21-03, 11:51 AM
.htaccess and .htpasswd are NOT working for me - and I have no idea what i've done wrong. I'm trying to protect a folder called SECURE on my site www.historyisgroovy.com (so that students cannot get to answer sheets for class)
this is the content of my .htaccess file, which was created using ULTRA EDIT, and which is inside the SECURE folder
AuthUserFile /www/h/historyrocks/.htpasswd
AuthGroupFile /dev/null
AuthName "sorry. restricted area"
AuthType Basic
<Limit GET POST>
require user historyrocks
</Limit>
this is the content of my .htpasswd file (which i believe is at the correct level on my site)
historyrocks:historyrocks
when i try to get to SECURE, a pop-up menu shows up with "historyrocks" as a user, but entering the password results in the following message.
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
I'm at a complete and total loss. please help
alphadesk
6-21-03, 12:11 PM
historyrocks...lets see if we can get you going
1. Make sure word wrap is off.
2. Make sure you upload .htaccess in ascii mode
3. Login to OPS and click the http tab..use what it says there that your document root is. Replace the "htdocs" part with ".htpasswd"
4. Make sure you have encryptyed your password.
http://help.powweb.com/cgi-bin/crypt.cgi
5. Upload .htpasswd ascii mode same level as htdocs
ex:
cgi-bin
htdocs
logs
.htpasswd
Ex: .htpasswd file
AuthUserFile /www/h/historyrocks/.htpasswd
AuthGroupFile /dev/null
AuthName "sorry. restricted area"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
Ex: .htpasswd file
historyrocks:soChucGmjoBvA
historyrocks
6-21-03, 12:41 PM
thanks for your quick response: more questions:
2. Make sure you upload .htaccess in ascii mode (i use dreamweaver. does it upload files without an extension in ASCII mode? (i checked the FTPextensions map in the configuration folder and saw nothing that indicated what happens to a file without an extension)
5. Upload .htpasswd ascii mode same level as htdocs
ex:
cgi-bin
htdocs
logs
.htpasswd
how do you do this? right now, the .htpasswd file looks like it is at the same "level" as the index.html file. is that the right level? if not, how do you direct an individual file to a certain level?
i'm sorry if this is basic, but i'm trying to teach myself this stuff.
alphadesk
6-21-03, 12:48 PM
2. Make sure you upload .htaccess in ascii mode (i use dreamweaver. does it upload files without an extension in ASCII mode? (i checked the FTPextensions map in the configuration folder and saw nothing that indicated what happens to a file without an extension)
Use FTP program to upload these files..use this..it's good and free
http://smartftp.com
5. Upload .htpasswd ascii mode same level as htdocs
ex:
cgi-bin
htdocs>index.html
logs
.htpasswd
index.html is inside htdocs...you need to go up a level with .htpasswd
I upload all of my .whatever files with DW MX and it uploads fine, they all work.
I was told that removing <limit GET POST> and </limit> from around require valid user, might work.
example
AuthUserFile /www/u/username/.htpasswd
AuthGroupFile /dev/null
AuthName "This what you want it to say"
AuthType Basic
require valid-user
historyrocks
6-23-03, 05:38 PM
I tried both suggestions. and the password authorization message continues.
i must be an idiot.
when I use smartftp to upload, the site i see has the server listers and four folders. i'm guessing that's where .htpasswd should show up, but it never shows. and apparently never works.
i don't know if i'm not doing this ASCII thing or if I just don't know how to put something at a certain level.
any suggestions?
alphadesk
6-23-03, 05:46 PM
historyrocks
I sent you a private message...please read.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.