httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Question
Date Mon, 29 Sep 2008 14:43:59 GMT
On Mon, 2008-09-29 at 07:04 -0700, jg6789@cox.net wrote:
> This...
> Alias /music "d:/my music"
> <directory "d:/my music">
>   Order allow,deny
>   Allow from all
> </directory>
> ...Doesnt work. Does it have to be somehwere special in the config file? 
> stopped and restarted apache to refresh config file.
> 
> furthermore the link path upon clicking shows file:///D:/My Music rather 
> than http://localhost/D:/My Music
> 

You need to understand the difference between URL paths and file paths.
Apache mounts (or attaches) the folder specified in the DocumentRoot
directive into the URL-space at '/'. Therefore, if you ask for
'/music/', and your document root is "c:/www-root", then it looks for
the folder 'c:/www-root/music/' on your disk. There is NO WAY to specify
a hyperlink that looks at your D drive, or anywhere outside your
document root. To work around that, you can alias other parts of your
filesystem in the URL-space, with the Alias command. 

To then use that alias, as posted by Eric Covener, you would have a URL
to linking to '/music/foo.mp3', which apache will translate to 'd:/my
music/foo.mp3'.

I hope that makes it clearer. If not, the manual is a good read.

Tom

Mime
View raw message