How to enable symlinks and .htaccess from user webspace directories on a default OS X Apache configuration
Whenever I set up a new OS X box I drive myself crazy trying to remember which part of the Apache config needs to be tweaked to allow symlinks to arbitrary parts of the file tree from the document root. /private/etc/httpd/httpd.conf includes
Options FollowSymLinks for Directory /, and it’s tempting to think that should take care of it. Then I remember that there are sub config files for each user on the system, in /private/etc/httpd/users/. These do not specify anything for FollowSymLinks, so again, it’s tempting to think that this property will be inherited from Directory /, but then we realize, the Options directive in this file overwrites any previous Options directives.
Anyway, the solution is: tack FollowSymLinks onto the end of Options Indexes MultiViews in your user config file in /private/etc/httpd/users/.
Also: activate php in the main config and, to enable .htaccess files, comment out AllowOverride None in the user config.
3 Comments