Discussion Locked

HTML password problem

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm trying to use .htaccess and .htpasswd to set up a password for a web page this is the .htaccess file.
---------------------------------------------
AuthUserFile /page/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic

require user JANUS
---------------------------------------------
.htpasswd

USERNAME:ENCRYPTED PASSWORD
---------------------------------------------
The problem I have is that after these are put on the server it asks for the user and pass and no matter what I put in (even the correct user and pass) it kicks me back to the user/pass box three times then kicks me to a not authorized page. Can anyone help here?

7 replies

by hugevlad

Hi !

You put full path to AuthUserFile, but http-server usualy works on its own "root". Try use relative path to .htpasswd

With best regards,
Vlad.
mailto:hugevlad@yahoo.com

by spepper

On my server, (Apache/1.3.12, on Solaris) the proposed solution will not work. .htaccess requires an absolute Unix path, not an absolute server path. Relative paths do not work. You also need to make sure that the .htpasswd file is readable by the server.

For detailed instructions, assuming a Unix box, see http://www.wlu.ca/toolbox/howto/password.html

by sdfgsdf

i'm not sure what server you are running, but if it is Microsoft's IIS, i am having a similiar problem. you see, UNIX manages user accounts via a database, thus allowing password protected pages, and user self created registration accounts. NT controls all user through the ACL via a domain controller. while a workgroup member usually can log in, users already logged onto a domain (ie network environment) cannot due to firewalls and proxys. i am trying to build a members only portion of a publicwebsite and i am running into this issue. i need to find a way around it.

This discussion is closed to new replies.