Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache on WinXP is ignoring my htaccess file 1

Status
Not open for further replies.

jimoblak

Instructor
Oct 23, 2001
3,620
US
I've created a .htaccess and .htpasswd file in a subdirectory of my document root called 'security'. Unfortunately it does not work. I believe that a setting in the httpd.conf is over-riding the .htaccess files placed in subdirectories. Do I believe correctly? Is there a setting to tweak in httpd.conf to allow the .htaccess file to work? Does this not work on WinXP?

.htaccess file contains...

AuthName "Protected Area"
AuthType Basic
AuthUserFile C:/WebDocs/security/.htpasswd
require valid-user


.htpasswd file contains...

jim:$1$Jc5.e2/.$YqoFwFYPA44myMc81Qd.V0


- - picklefish - -
 
Apache needs to be told what configuration options in .htaccess files it should obey. Somewhere in your default configuration, this has probably been set to none.

The configuration directive AllowOverride is the one that sets this up. Something like:

<Directory /path/to/dir>
AllowOverride AuthConfig
</Directory>

See more in the Apache online manual: (Apache 1.3.x), (Apache 2.x)

Want the best answers? Ask the best questions: TANSTAAFL!!
 
Thanks - I was wrestling with this for some time but realized that AllowOverride appears twice in httpd.conf

Tweaking the overall setting and the directory setting works now.

I'm using apache 2

- - picklefish - -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top