ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Apache Web-Serving with Mac OS X, Part 4
Subject:   Link to folder outside /Sites folder -- possible?
Date:   2002-02-27 23:45:30
From:   dredjohn
I've read through the series here -- very novice friendly. But I haven't found a way to do something that I perceive is very basic.


I've installed a php file manager so that I can let my friends and family browse through a pictures folder I have set up in my user directory.


For the sake of discussion, my website address is http://192.168.1.1/~marty/


On my harddrive this equates to /users/marty/Sites/


Pretty standard.


The pictures folder is located at:


/users/marty/Pictures/


I've tried creating a symbolic link:
ln -s ~/marty/Pictures ~/marty/Sites/pics


This makes "pics" a linked folder. I can cd to it in terminal, but if I go to my php filemanager it only sees the pics folder as a file. Clicking on it produces an error.


If I go directly to the url:
http://192.168.1.1/~marty/pics/


I get an error 403 about permissions.


I've tried editing marty.conf. It now reads:


<Directory "/Users/marty/Sites/">
Options Includes Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>


I've also tried fiddling with settings in httpd.conf -- basically mimicking the settings above in areas I thought might make a difference.


Nothing helped.


But one that WAS interesting is despite all of these problems, I CAN link to any folder above the /Sites directory (i.e. /users/marty/Sites/temp/transfer)


In the above example, I can create a link of "transfer" in the Sites directory and access it with ease in the php filemanager AND through url access. Very strange...


I'd think it's quite common for website designers to link to folders on different harddrives or in directories outside of the Sites folder.


Maybe I'm wrong. Hopefully there is an easy answer to this, as I'd rather not have to duplicate all of my files - or move my pictures into the Sites directory.


Thanks in advance to any who have tips.


1 to 1 of 1
  1. Kevin Hemenway photo Link to folder outside /Sites folder -- possible?
    2002-03-11 08:55:53  Kevin Hemenway | O'Reilly AuthorO'Reilly Blogger [View]

1 to 1 of 1