Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting up a password protected directory

Status
Not open for further replies.

scottyandpear

IS-IT--Management
Jan 14, 2003
8
US
Im using win xp pro and i am using apache 1.3.7.. i have no problem running my website... i might have all my files wrong i have all my .html files under the folder "htdocs" and it seems to work fine. I have another directory called "gallery" and the contents of that folder is digital camera pictures.. im trying to password protect that directory.. i have been reading on the net i TRIED to config the httpd.conf file added a .htpasswd and a .htaccess file and it doesnt work.. is there anyone that could help me.. if i had to i will delete my files.. to start from scratch. some one told me about php. so i downloaded php and i THINK i installed it fine

also.. has anyone used gallery remote for windows.. its usually used on linux and mac. im learning linux so i might try to install the program on it.

thanks scotty
 
Did you setup or created an htpasswd? Here is more info on htpasswd:

Usage:
htpasswd [-cmdps] passwordfile username
htpasswd -b[cmdps] passwordfile username password

htpasswd -n[mdps] username
htpasswd -nb[mdps] username password
-c Create a new file.
-n Don't update file; display results on stdout.
-m Force MD5 encryption of the password.
-d Force CRYPT encryption of the password (default).
-p Do not encrypt the password (plaintext).
-s Force SHA encryption of the password.
-b Use the password from the command line rather than prompting for it.
On Windows, TPF and NetWare systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.


Hope this helps....
 
does all those letters apply to windows?? or is that just linux??
 
where do i type all this info at im in the c:\Documents and settings\username directory... is there any way.. because i have tried all those lines and it doesnt work..

ps thanks for the help

if you have
aim you can im me scottyandpear
msn pjgonzales
yahoo pjgonzales1229

 
Your .htaccess is a text file that must be created and have this syntax:

AuthUserFile "C:/Apache/htdocs/domain/protected/.htpasswd"
AuthGroupFile /null
AuthName "Restricted Area"
AuthType Basic

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

with the AuthUserFile showing your actual path to the protected directory.

Then find the directory that has the .htpasswd.exe command and use it to create the .htpasswd file. If necessary, move the new .htpasswd file to the protected directory if it isn't created there by default. Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
Im familiar with running Apache on solaris but if theirs any similarity theres an AllowOverride directive in the httpd.conf file that is set to none by default but needs to be set to all in order for the server to recognize your .htaccess file.

Dave
 
AllowOverride Authconfig

AccessFileName .htaccess

both must be active statements in .httpd.conf Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top