Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Files and/or links outside the DocumentRoot |
|
Author |
|
TheLandYacht
Joined: 23 Jul 2010 Posts: 1
|
Posted: Fri 23 Jul '10 11:17 Post subject: Files and/or links outside the DocumentRoot |
|
|
Been huntin like crazy to find a way around this...the instructions on Apache's main site read like greek to me cuz I don't know enough about *nix to translate it to something I can use in Windows.
OK. So, my situation. Recently installed & configured (for the first time) Apache for WinXP. (Think it's 2.2). Got it setup right (I guess), since puttin "localhost" in a browser gives me "It Works". Eventually I'll have a page built in here that (and here's the key part) accesses files not not only not inside the DocumentRoot folder, but not even on the same hard drive, due to size constraints.
Eventually, a page in this document will have links that look like
Code: | <A HREF="FILE://whatever.mpg>CLICK HERE</A> |
which when opened will, if they function the same as when I just drop the html from a folder on the hard drive into a browser...just open the file as if I'd doubleclicked it...when I click on the link.
But the mpeg files (and assorted other files) can't live on that drive cuz it ain't big enough...matter of fact, no single drive is.
I thought about using a "junction", like http://forum.eeeuser.com/viewtopic.php?id=47961, but when I point a browser at it after restarting Apache...it asks me for a username & password (!?).
Am I overthinking this? Is there an easier way to point outside DocumentRoot? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 23 Jul '10 13:44 Post subject: |
|
|
the file in the href does not work. If you have a folder outside the document root with your videos it is easier to create an alias to that folder
e.g
Code: |
Alias /videos/ C:/videos
<Directory C:/videos>
Options All
Order Allow, Deny
Allow from All
Deny from none
</Directory>
|
Than in the html
Code: |
<a href="/videos/whatever.mpg">CLICK HERE</a>
|
|
|
Back to top |
|
|
|
|
|
|