This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Tomcat and the fly likes password protection --> .htaccess Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "password protection --> .htaccess" Watch "password protection --> .htaccess" New topic

password protection --> .htaccess

Rocky Summers
Ranch Hand

Joined: Nov 07, 2003
Posts: 66
hi guys. i have apache on windows xp. i was wondering how i can password protect a directory.. i tried looking up the net yesterday but couldn't configure it properly. i understand that i must have a .htaccess, .htpasswd, and configure my httpd.conf right? but i'm not doing it right somehow..
here's where my .htpassword file is:
here's where i want to put my .htaccess:
this is what my .htaccess looks like:
AuthUserFile /usr/local/apache/bin/.htpasswd
AuthGroupFile /dev/null
AuthName "Identity Required"
AuthType Basic
<Limit GET POST>
require valid-user
am i doing this right? what should i configure in my httpd.conf? i already did the .htpasswd using the executable in the bin foler.
thank you for your help
Steve Jiang
Ranch Hand

Joined: May 17, 2004
Posts: 124
Need answer for this old question too.

Any help?
I agree. Here's the link:
subject: password protection --> .htaccess
It's not a secret anymore!