To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
Using a .htpassword file in a windows installation
I installed apache over windows, and I am trying to use a .htaccess file to password protect a directory. I create my .htpasswd file with the username and the crypted password and I have an .htaccess file like this:
allow from all
AuthType Basic
AuthUserFile c:/home/myweb/cgi-bin/.htpasswd
require valid-user
When I point my browser at http://localhost/ it asks me for the username and password, but it won't accept it. I keep getting an access denied page.
I have tested the same .htpasswd file in an apache server over Linux an it works, what could be the problem with windows?
RE: Using a .htpassword file in a windows installa
A ".htpasswd"-file created on Linux will NEVER WORK IN WINDOWS!!!
The reason is obvious: there's not the same encryption type. Windows uses MD5 and Linx something else.
Try again! You might have luck this time!
RE: Using a .htpassword file in a windows installa
The .htaccess file need to be in the directory that is password protected. The .htpassword can be anywhere, but you must point to it from the htpasswd
My document root is
c:\www\web\htdocs
In a directory named "private" I placed the .htaccess file, then whenever I want to access that directory it asks me for the username and password. The contents of the htaccess file I have is
allow from all
AuthType Basic
AuthUserFile d:/www/web/htdocs/private/.htpasswd
AuthName "Private area"
require valid-user
and I have the .htpasswd file in the same directory. Hope this example helps.
RE: Using a .htpassword file in a windows installa
To create a .htaccess or .password file in Windows, make a file called something like "htaccess" and drop to MS-DOS and rename it, e.g. REN htaccess .htaccess
OK I have been screwing with this same thing for days, and I can't get it to work. A friend of mine said you have to modify something in http.conf for apache to comprehend .htaccess on Windows. Any ideas?