Computing.Net > Forums > Web Development > .htpasswd on Windows

.htpasswd on Windows

Reply to Message Icon

Original Message
Name: RTAdams89
Date: July 9, 2008 at 19:49:46 Pacific
Subject: .htpasswd on Windows
OS: Windows XP
CPU/Ram: na
Model/Manufacturer: na
Comment:

I'm pretty experienced with computers and Apache, but this is the first time I have tried to install Apache on a windows computer. Here is my problem:

Apache is installed at: C:\Program Files\Apache Software Foundation\Apache2.2

My web files are stored at: E:\

I've set up the conf file and I can access the files in the root of E:\ by going to http://localhost:80

So the server is up and running fine.

I've also created a .htaccess file and placed it in E:\. It contains:
------------------------
AuthType Basic
AuthUserFile "C:\Program Files\Apache Software Foundation\Apache2.2\conf\.htpasswd"
AuthName "Test Login"
Require admin
-------------------------

The .htpasswd file was generated by using the "htpasswd.exe" in the Apache bin directory.

Now, when I go to http://loachost:80 I am prompted for a user name and password, however, the password is not accepted. And yes, I am typing it correctly.

Any ideas as to why it won't accept the password set in the .htpasswd file?

-Ryan Adams
http://RyanTAdams.com


Report Offensive Message For Removal


Response Number 1
Name: Elinor
Date: July 31, 2008 at 03:40:03 Pacific
Reply: (edit)

Hi,

I wonder whether it can find the file.
Have you tried:

AuthUserFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/.htpasswd"

I think it gets confused with the \ character if it's not escaped.

It could also be the basic authentication module isn't getting loaded (httpd.conf LoadModule sections).

hth

Elinor Hurst
http://elinorhurst.blogspot.com


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: .htpasswd on Windows

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge