Apache Web-Serving with Mac OS X, Part 4
Subject:   Alias' Don't work
Date:   2002-03-11 09:02:27
From:   morbus
Response to: Alias' Don't work

In OS X, an "alias" in the Finder is the same as an "alias" under OS 9. However, Apache lives under the BSD layer of OS X, so "alias"es don't work the same. What you're looking for are "symlinks".

If you're picture directory is called (for example), "My Real Pictures", and it lives in your Mac HD, and you want a "pictures" directory under your personal website, run these commands in the Terminal:

ln -s "/My Real PIctures" "/Users/username/Sites/pictures/"
chown 755 "/My Real Pictures"

You'll also have to tell Apache to follow symlinks when it's serving various webpages. To do so, edit your /etc/httpd/users/username.conf file, and add "FollowSymLinks" to the "Options" line. Finally, restart Apache, and things should be working for ya.