Can't get .htaccess to work on Apache under Windows XP

This is a discussion on Can't get .htaccess to work on Apache under Windows XP within the Windows Web Servers forums, part of the Web Server and Related Forums category; Greetings, I can't seem to get .htaccess to work on Apache2+ under WinXP Pro. First I installed and configured ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2004
Kevin
 
Posts: n/a
Default Can't get .htaccess to work on Apache under Windows XP

Greetings,

I can't seem to get .htaccess to work on Apache2+ under WinXP Pro.
First I installed and configured Apache and got everything configured
and working properly (nothing's live yet just working off of
localhost). Then I created the two files, .htaccess and .htpasswd,
using the htpasswd.exe application that comes with Apache (I had to do
it this way becuase you can't create a file with a nameless extension
on the desktop). Finally I created two new filetypes for .htpasswd
and .htaccess so I could open them in notepad.

The .htpasswd contains a single user (md5 encrypted) and looks like
this:
stone:$apr1$e50.....$szuwghDBUK3q5SBK6gkAM.

The .htaccess file resides within the subdirectory I want to password
protect and looks like this:
AuthUserFile D:\Program Files\Apache Group\Apache2\.htpasswd
AuthType Basic
AuthName "Member Page"
require valid-user

All relevant lines in the httpd.cnfg file are:
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>

Apache does its job when I attempt to view the .htaccess file I get a
Permission Denied message. But when I browse to the protected
directory where my .htaccess file resides my browser displays the
index page rather than prompting me for a password.

What am I doing wrong?

Thanks,
Kevin Stone
  #2 (permalink)  
Old 02-27-2004
Robin Strahan
 
Posts: n/a
Default Re: Can't get .htaccess to work on Apache under Windows XP

make sure u have the AllowOverride directive set.

Go to the subdir u want to protect in your conf file and type AllowOverride
AuthConfig

i.e. to use .htaccess files in the dir called access you would need this in
your conf file.

<Directory "C:\Program Files\Apache Group\Apache2\htdocs\access">
Options +Indexes
AllowOverride AuthConfig
</Directory>

hope this helps

Robin

"Kevin" <kevinstone3387@hotmail.com> wrote in message
news:66f77f3a.0402262318.138b6055@posting.google.c om...
> Greetings,
>
> I can't seem to get .htaccess to work on Apache2+ under WinXP Pro.
> First I installed and configured Apache and got everything configured
> and working properly (nothing's live yet just working off of
> localhost). Then I created the two files, .htaccess and .htpasswd,
> using the htpasswd.exe application that comes with Apache (I had to do
> it this way becuase you can't create a file with a nameless extension
> on the desktop). Finally I created two new filetypes for .htpasswd
> and .htaccess so I could open them in notepad.
>
> The .htpasswd contains a single user (md5 encrypted) and looks like
> this:
> stone:$apr1$e50.....$szuwghDBUK3q5SBK6gkAM.
>
> The .htaccess file resides within the subdirectory I want to password
> protect and looks like this:
> AuthUserFile D:\Program Files\Apache Group\Apache2\.htpasswd
> AuthType Basic
> AuthName "Member Page"
> require valid-user
>
> All relevant lines in the httpd.cnfg file are:
> AccessFileName .htaccess
> <Files ~ "^\.ht">
> Order allow,deny
> Deny from all
> </Files>
>
> Apache does its job when I attempt to view the .htaccess file I get a
> Permission Denied message. But when I browse to the protected
> directory where my .htaccess file resides my browser displays the
> index page rather than prompting me for a password.
>
> What am I doing wrong?
>
> Thanks,
> Kevin Stone
>



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:02 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0