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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

.htpasswd on Windows

Reply to Message Icon

Name: RTAdams89
Date: July 9, 2008 at 19:49:46 Pacific
OS: Windows XP
CPU/Ram: na
Product: 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



Sponsored Link
Ads by Google

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

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: .htpasswd on Windows

Viewing IE6 Rendering on Windows 7 www.computing.net/answers/webdevel/viewing-ie6-rendering-on-windows-7/3934.html

Path to .htpasswd file www.computing.net/answers/webdevel/path-to-htpasswd-file/2204.html

cant access webpage outside lan ..? www.computing.net/answers/webdevel/cant-access-webpage-outside-lan-/3045.html