Spice Posted April 24, 2004 Posted April 24, 2004 How can i create this .htpasswd file localy and upload it to my site by FTP. Or is there a php script that anyone has that make it able to create this file. My host does not give me the option to make this file, and there is no command line. =// help please. I have the .htaccess file ready.
bluepony Posted April 24, 2004 Posted April 24, 2004 Use a text editor like notepad and create a file named htpasswd.txt locally. There are several websites with password generators. Try this one http://www.psu.edu/dept/cac/publish/htpasswd/htpasswd.html Just enter your username and password and then copy the encrypted string into your htpasswd.txt file. Save that file then rename it to .htpasswd and FTP it to your website. I'd rather be flying!
Spice Posted April 24, 2004 Author Posted April 24, 2004 ok now I have gotten the .htpasswd file and my encrypted pass but how will I link it to the htaccess file? .htaccess links to the .htpasswd with AuthUserFile /www/shop/admin/.htpasswd and when I tried with just the user:password and try to logg on I cant get in. I only get the post username/password popup again. =(( this is my .htaccess file AuthUserFile /www/shop/myadminfolder/.htpasswd AuthGroupFile /dev/null AuthName "Restricted area" AuthType Basic <Limit GET> require user userid [myownuserid] </LIMIT> this is my .htpasswd file myownuserid:theencryptedpass help?
bluepony Posted April 24, 2004 Posted April 24, 2004 Syntax should be <Limit GET> require user myownuserid </LIMIT> or just <Limit GET> require valid-user </LIMIT> I'd rather be flying!
AlanR Posted April 24, 2004 Posted April 24, 2004 You can snag a free copy of FileMan and it will do this nicely for you, manage folder protection and much more. http://www.gossamer-threads.com/scripts/fileman/index.htm It's a quick and easy install. There's one place where the install can mislead you though. The default installer is great except it wants to put the images folder in cgi-bin. If you do that the images won't load. Just backspace through cgi-bin in the two lines relating to the images folder. You can rename the folder if you like. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
SLO_Cowboy Posted April 25, 2004 Posted April 25, 2004 Can anybody tell me, where to put this two files ? Im fresh in this. Is there any step-by-step for this password protection ? And why is not included in install procedure? Thanks for answers.
bluepony Posted April 25, 2004 Posted April 25, 2004 Adding password protection to a directory using .htaccess takes two stages. The first part is to add the appropriate lines to your .htaccess file in the directory you would like to protect. Everything below this directory will be password protected. Password protecting a directory takes a little more work than any of the other .htaccess functions because you must also create a file to contain the usernames and passwords which are allowed to access the site. These should be placed in a file which (by default) should be called .htpasswd. Like the .htaccess file, this is a file with no name and an 8 letter extension. This can be placed anywhere within you website (as the passwords are encrypted) but it is advisable to store it outside the web root so that it is impossible to access it from the web. Just do a search on the web, there are many tutorials on .htaccess. And it is mentioned in the install. See http://wiki.oscommerce.com/docsInstallNew I'd rather be flying!
SLO_Cowboy Posted April 26, 2004 Posted April 26, 2004 THX bluepony ! Just 2 more questions :rolleyes: For ex. I have my Admin dir on http://localhost/oscomm/admin Is this right: AuthUserFile /localhost/oscomm/admin/.htpasswd ? And what means: AuthGroupFile /dev/null ? And how do you tell where you have .htpasswd ? OK....that was 3 :D Will try in the morning. Its late here (3.00 a.m.) ;) Have to catch some sleep. Bye...thanks for answer
Recommended Posts
Archived
This topic is now archived and is closed to further replies.