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!

.htaccess Win32?

Status
Not open for further replies.

zuul

Technical User
Nov 5, 2002
1
US
Hi,

I'm using Win2k and Apache 1.3.20. I'd like to password protect one of my directories. I changed the access file name tag to

AccessFileName ht.access

in httpd.conf 'cause its easier to handle on win32 systems. Also I changed the 'view' protection:

<Files ~ &quot;^\ht.&quot;>
Order allow,deny
Deny from all
</Files>

My ht.access file located in the directory I'd like to protect looks like this:

AuthName MyPlace
AuthType Basic
AuthUserFile D:\require valid-user

I also tried slashes instead of backslashes and relative paths in AuthUserFile. The ht.passwd file located in the same directory has following syntax:

guest:1u8bSeSPld2F6

I additionally have virtual hosts. In this case the directories ARE in a virtual host. The virtual host tag looks like this:

<VirtualHost 192.168.0.220>
ServerAdmin webmaster@server1.home
DocumentRoot D:\</VirtualHost>

The Document root for the server is set to D:\www. I tried slashes instead of backslashes mostly everywhere. Works with both. But my authorization won't work! Directory is accessable for everyone. And don't tell me to 'restart the service' under Win32. I did this 234965298356239847523984 times ;-))

Thx for your help
 
I haven't used .htaccess exactly the way you do. I usually just add a directory directive and put all the htaccess stuff in there. Have you made sure that all the folders from the root of the web server up to the password protected area have the correct AllowOverride directive? This is important if you don't want any unauthorized person viewing the folder. It has to be like this:

<Directory &quot;D:/ Options Indexes FollowSymLinks Blah Blah
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

If that doesn't help, I don't have enough work to do here at my job so I'll go play around with htaccess and give you a more specific solution.
Steve Kiehl
webmaster@nanovox.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top