Gossamer Forum
Home : Products : Links 2.0 : Discussions :

PASSWORD PROTECT ADMIN DIR ???

Quote Reply
PASSWORD PROTECT ADMIN DIR ???
I am having a difficult time trying to password protect my admin dir. I can get
.htaccess to protect the directory, and the password box comes up but when I type in my user name and password. It does not work. I have tried everything, Please advise...

This is a sample of how I have the .htaccess setup:

AuthUserFile /home/mysite/www/.htpasswd
AuthGroupFile /dev/null
AuthName "zack"
AuthType Basic
<limit GET>
require user zack
</limit>


This is what I have for my .htpasswd

zack:$1$$zlzO/u0rMvI3jy4tvvhq10


Thanks
Quote Reply
Re: PASSWORD PROTECT ADMIN DIR ??? In reply to
If your Web is located on a recent version of Apache, you have configured your .htaccess file completely wrong.

Here is what you can try, if you on an Apache server and using versions 1.2.1 and higher:

Code:
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName "My Admin Area"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

Change the /path/to/ to your admin directory where you have your admin.cgi file. Also, you can change "My Admin Area" to whatever you want.

Then there are certain methods of creating the .htpasswd file. They have to be done in your shell telnet account.

If your ISP does not have instructions for setting up .htaccess/.htpasswd, feel free to check out the following web page, which is written by my ISP:


Hope this helps.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 10, 1999).]