You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by jg...@cox.net on 2008/09/29 01:27:21 UTC

[users@httpd] Question

Current: default configuration

status: index.html file in C:/xampp/htdocs. trying to hyperlink to another drive on the local machine.(D:)or (D:/My Music) wont work.




Confidential: This email is intended only for the person or entity to which it is addressed. The information contained in this email is confidential and privileged. Any retransmission, review, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this email in error, please let us know by reply and destroy all copies of it.

Re: [users@httpd] Question

Posted by Eric Covener <co...@gmail.com>.
On Mon, Sep 29, 2008 at 10:28 AM,  <jg...@cox.net> wrote:
> Is there a way to get around the requirement of an index file being in
> there? i.e. it links but access is forbidden because there is no index file.

Hopefully the ErrorLog told you to set Options +Indexes to get a
directory listing.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question

Posted by jg...@cox.net.
Is there a way to get around the requirement of an index file being in 
there? i.e. it links but access is forbidden because there is no index file.

----- Original Message ----- 
From: "Eric Covener" <co...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Monday, September 29, 2008 7:09 AM
Subject: Re: [users@httpd] Question


> On Mon, Sep 29, 2008 at 10:04 AM,  <jg...@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
>
> Create a link to /music , not a link to a path in your filesystem
> (your HTML editor probably did this)
>
> -- 
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.7.5/1696 - Release Date: 9/28/2008 
1:30 PM


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question

Posted by Eric Covener <co...@gmail.com>.
On Mon, Sep 29, 2008 at 10:04 AM,  <jg...@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

Create a link to /music , not a link to a path in your filesystem
(your HTML editor probably did this)

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question

Posted by Diogo de Sousa Neves <la...@netcabo.pt>.
hi,

with that config lines you just need to access http://yourhost/music




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
>
> ----- Original Message ----- From: "Eric Covener" <co...@gmail.com>
> To: <us...@httpd.apache.org>
> Sent: Monday, September 29, 2008 4:29 AM
> Subject: Re: [users@httpd] Question
>
>
>> On Sun, Sep 28, 2008 at 8:41 PM,  <jg...@cox.net> wrote:
>>> [error] [client 127.0.0.1] (20023)The given path was above the root 
>>> path:
>>> Cannot map GET /D:/My%20Videos HTTP/1.1 to file, referer: 
>>> http://localhost/
>>>
>>> I read all Alias Instructions in manual. not clear to me.
>>>
>>> How do I add an alias and/or add a directory block that will work?
>>>
>>> Here is what I am trying to do:
>>> in the index.html file in C:/xampp/htdocs...I am trying to hyperlink 
>>> like
>>> this <a href="D:/My Music">Music</a>
>>>
>>
>> Alias /music "d:/my music"
>> <directory "d:/my music">
>>    Order allow,deny
>>    Allow from all
>> </directory>
>>
>> -- 
>> Eric Covener
>> covener@gmail.com
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server 
>> Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
> -------------------------------------------------------------------------------- 
>
>
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com
> Version: 8.0.169 / Virus Database: 270.7.5/1696 - Release Date: 
> 9/28/2008 1:30 PM
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question

Posted by Tom Evans <te...@googlemail.com>.
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

Re: [users@httpd] Question

Posted by jg...@cox.net.
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

----- Original Message ----- 
From: "Eric Covener" <co...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Monday, September 29, 2008 4:29 AM
Subject: Re: [users@httpd] Question


> On Sun, Sep 28, 2008 at 8:41 PM,  <jg...@cox.net> wrote:
>> [error] [client 127.0.0.1] (20023)The given path was above the root path:
>> Cannot map GET /D:/My%20Videos HTTP/1.1 to file, referer: 
>> http://localhost/
>>
>> I read all Alias Instructions in manual. not clear to me.
>>
>> How do I add an alias and/or add a directory block that will work?
>>
>> Here is what I am trying to do:
>> in the index.html file in C:/xampp/htdocs...I am trying to hyperlink like
>> this <a href="D:/My Music">Music</a>
>>
>
> Alias /music "d:/my music"
> <directory "d:/my music">
>    Order allow,deny
>    Allow from all
> </directory>
>
> -- 
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.7.5/1696 - Release Date: 9/28/2008 
1:30 PM


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question

Posted by Eric Covener <co...@gmail.com>.
On Sun, Sep 28, 2008 at 8:41 PM,  <jg...@cox.net> wrote:
> [error] [client 127.0.0.1] (20023)The given path was above the root path:
> Cannot map GET /D:/My%20Videos HTTP/1.1 to file, referer: http://localhost/
>
> I read all Alias Instructions in manual. not clear to me.
>
> How do I add an alias and/or add a directory block that will work?
>
> Here is what I am trying to do:
> in the index.html file in C:/xampp/htdocs...I am trying to hyperlink like
> this <a href="D:/My Music">Music</a>
>

Alias /music "d:/my music"
<directory "d:/my music">
    Order allow,deny
    Allow from all
</directory>

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question

Posted by jg...@cox.net.
[error] [client 127.0.0.1] (20023)The given path was above the root path: 
Cannot map GET /D:/My%20Videos HTTP/1.1 to file, referer: http://localhost/

I read all Alias Instructions in manual. not clear to me.

How do I add an alias and/or add a directory block that will work?

Here is what I am trying to do:
in the index.html file in C:/xampp/htdocs...I am trying to hyperlink like 
this <a href="D:/My Music">Music</a>

----- Original Message ----- 
From: "Eric Covener" <co...@gmail.com>
To: <us...@httpd.apache.org>
Sent: Sunday, September 28, 2008 4:51 PM
Subject: Re: [users@httpd] Question


> On Sun, Sep 28, 2008 at 7:27 PM,  <jg...@cox.net> wrote:
>> Current: default configuration
>>
>> status: index.html file in C:/xampp/htdocs. trying to hyperlink to 
>> another
>> drive on the local machine.(D:)or (D:/My Music) wont work.
>
> What does your error log say?  Did you add an Alias for those
> directories? Did you add a <Directory> block matching the one for your
> DocumentRoot to allow access?
>
> -- 
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.169 / Virus Database: 270.7.5/1696 - Release Date: 9/28/2008 
1:30 PM


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question

Posted by Eric Covener <co...@gmail.com>.
On Sun, Sep 28, 2008 at 7:27 PM,  <jg...@cox.net> wrote:
> Current: default configuration
>
> status: index.html file in C:/xampp/htdocs. trying to hyperlink to another
> drive on the local machine.(D:)or (D:/My Music) wont work.

What does your error log say?  Did you add an Alias for those
directories? Did you add a <Directory> block matching the one for your
DocumentRoot to allow access?

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org