PDA

View Full Version : Need help on .htaccess...please reply!!!


mrssfuller
09-01-2009, 11:07 PM
I have created a .htaccess file, and put in the directory in which i want to protect, and i created an .htpasswd file and put in the following path /usr/local/bin/ When I go live with it, the box comes up asking for the user name and password, but it is not accepting the password. any suggestions? (this is for a linux hosted website with godaddy)

AuthName "Restricted Area"
AuthType Basic
AuthUserFile /usr/local/bin/.htpasswd
AuthGroupFile /dev/null
require valid-user


i've also tried (and anything else i can find on the net)

AuthUserFile /home/content/f/e/i/feislady/html/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Area"
AuthType Basic

require valid-user

clunk.werclick
09-12-2009, 02:26 PM
Apache2 single user called 'admin' example
{not sure which version of Apache you are running}

Serving normal content from: /home/www/experimental/htdocs
Serving password Protected from: /home/www/experimental/htdocs/auth
Password file location: /home/www/experimental/passwd/passwd

/home/www/experimental/htdocs/auth/.htaccess looks like:
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /home/www/experimental/passwd/passwd
Require user admin

Don't forget to create the password file for user admin
htpasswd -c /home/www/experimental/passwd/passwd admin

Worked right out of the box for me without enabling any modules or restarting. The reference I used was: http://httpd.apache.org/docs/2.0/howto/auth.html