Symbolic Link to files / harddrive out side of xampp?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Symbolic Link to files / harddrive out side of xampp?

Postby mewbie » 22. May 2009 15:41

I am using Windows XP3, Xampp v1.7.1
I searched post with symbolic link but couldn't find what I'm hoping is possible. Sorry if posted already:
I did see a post with a linux shell cmd ln -s /..... and I see mention of this in the httpd.conf so that gave me hope it is possible.

Xampp is installed here: D:\xampp Instead of me copying over all the files I want my users to have access to, would I be able to safely symbolic link to those 'directories'?
1.) I have files I would like to link to on my website here: D:\Sites\Friends\ (completely outside of xampp dir)
2.) and here: F:\Archive\Files (different drive than xampp)
3.) Most important users may not travel 'up' that directory structure ex; F:\Archive\ but users could travel down in the directory structure to any sub-directory there is ex; F:\Archive\Files\Wallpaper\hi-res\low-res etc


I really don't want to copy all those files over to my xampp directory because:
1. wasting space on hard drive, as I keep them safe and in tidy order where they are now with other files I won't offer to users (like source files).
2. If I make any changes to those files, and or have any new files to add I would have to add to 2 places (1 in orginal folder and another in xampp folder for users to access).

Thank you again for your time!! :D :D oooooo < m&m's
mewbie
 
Posts: 13
Joined: 21. May 2009 02:43

Re: Symbolic Link to files / harddrive out side of xampp?

Postby Wiedmann » 22. May 2009 16:54

would I be able to safely symbolic link to those 'directories'?

Sure. Make a symlink (junction point) or add an Alias directive in your httpd.conf.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: Symbolic Link to files / harddrive out side of xampp?

Postby mewbie » 22. May 2009 17:18

thank you 'again' Wiedmann :D. Happy this can be done!! wow.. ok, what you said to me is latin at this point in my mewbieness ;p

Would it be possible please to post examples using my paths to what I would enter in the httpd.conf and or junction point(?)
for XP SP3



(Off subject/OS a tad, but from what I have read If I was on linux remote I think I would do this:
ln -s /xampp/htdocs/files.html F:/Archive/Files < that seems wrong? Would link files.html to open directory Files? )
mewbie
 
Posts: 13
Joined: 21. May 2009 02:43

Re: Symbolic Link to files / harddrive out side of xampp?

Postby mewbie » 23. May 2009 19:09

Solved, this is what worked for me in case any other mewbies want to know how:
(Sorry if incorrect, and or not secure- please post if so my flaws)

Example you have: D:\Sites\Web\2009\Friends that you want to be able to open via your website, and Xampp is installed on D drive, add to your httpd.conf:

Alias /friends /Sites/Web/2009/Friends
<Directory /Sites/Web/2009/Friends>
Order allow,deny
Allow from all
</Directory>

To access this it would be: http://yoururl.com/friends
*note 'friends' dir shouldn't exist already in htdocs (your root directory) or it would be confused I imagine.

For a directory not on same drive as Xampp is installed it's the same thing except add Drive letter:
Alias /archive F:/sc/Archive
<Directory F:/sc/Archive>
Options Indexes
Order allow,deny
Allow from all
</Directory>

Also I added for my file archive (without web pages) this: Options Indexes
So that users can have a raw view of files and directory (as I had changed in the default in my httpd.conf to be -Indexes so that users couldn't have raw view of any directories)
To access this it would be: http://yoururl.com/archive
mewbie
 
Posts: 13
Joined: 21. May 2009 02:43


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 74 guests