Forum Moderators: phranque

Message Too Old, No Replies

.htaccess on aliased directories?

         

lachrimae

5:14 pm on Apr 12, 2004 (gmt 0)

10+ Year Member



Hello all,

I am trying to require user/pass on an Aliased directory.

What I've done is put the .htaccess file in the Aliased directory (which is on my H:\ drive).

The .htaccess file points to the .htpasswd file which is in my root directory (on c:\apache).

I am running .htaccess files with success on subfolders of the root but I cannot get it to work for Aliased directories.

Any ideas?

Thanks!

Mark

PS: I've tried putting the .htpasswd file in the Aliased dir along with the .htaccess file which then points to it but haven't had any luck there either.

Running WinXP Pro

JerryWMac

2:39 am on Apr 19, 2004 (gmt 0)

10+ Year Member



I am running WinXP Pro SP1, and Apache 2.49 or is that 2.049.
Anyway. I have the following drives.
C: with Windows system and most progs running
D: storage, 60 gigs Mainly music and ISO images.
E: Apache, web pages, etc.etc.

Ok, yes it works.
I can alias my D: drive

in each folder to be shared I have my .htaccess file
i.e.
AuthType Basic
AuthUserFile bin/htpasswd
AuthName "Restricted Area"
AuthType Basic

<Limit GET POST >
require valid-user
</Limit>

the line AuthUserFile bin/passes/htpasswd refers back to my apache2 folder where the names passwords are stored.

However, I have access to those external disk drives by alias within the http.conf file configurin APache.

JerryWMac

2:41 am on Apr 19, 2004 (gmt 0)

10+ Year Member



Reread:

What you need is to alias access the other drive from the drive where Apache is locating your root drive.

looks sort of:
alias "photos" "d:/photos"

then fill in permissions as stated form Apache for this.

lachrimae

4:42 am on Apr 19, 2004 (gmt 0)

10+ Year Member



Thanks for the replies... It turns out that I didn't have AuthConfig in my .conf file.