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!

about .htpasswd question thanks

Status
Not open for further replies.

melnet

Programmer
Jul 8, 2003
77
HK
hi
in the /home/peter folder, i typed a command:

htpasswd -c .htpasswd tom

then i typed a two passwords.
in the /home/peter/public_html, i created a abc folder.
then in the abc folder, i created .htaccess
the code is:

AuthUserFile /home/peter/.htpasswd
AuthName "Private Directory"
AuthType Basic
require valid-user

i browsed a link, and pop up the htpasswd box. However, after i typed the login and passwd, they didn't match, maybe wrong login or passwd. but i confrim the a/c is right.
anyone help me where problem is or i set some config again?
thanks for help.....
 
Hi,

Try modifying your .htaccess file like so:

AuthUserFile /home/peter/.htpasswd
AuthName "Private Directory"
AuthType Basic
require valid-user

<Limit GET POST>
require user theusername
</Limit>


Blizz
 
i tried b4
it didn't work...


AuthUserFile /home/peter/.htpasswd
AuthName &quot;Private Directory&quot;
AuthType Basic
require valid-user

<Limit GET POST>
require user theusername
</Limit>

it said bad password....
i need to config the httpd.conf?

thanks for help
 
Look at your httpd.conf or access.conf in your httpd/conf/ directory and be sure that you have the:

AllowOverride All (rather than None) set

See this description from one of my access.conf files>>


# This controls which options the .htaccess files in directories can
# override. Can also be &quot;All&quot;, or any combination of &quot;Options&quot;, &quot;FileInfo&quot;,
# &quot;AuthConfig&quot;, and &quot;Limit&quot;

AllowOverride All


Good Luck,
Laurie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top