why does apache forbid access via symbolic links?
I am trying to install typo3 as per the instructions but I have a bit of a puzzle to solve. It seems apache denies access to any files I try to access via any symbolic link in the site root directory. I have changed permissions from SymLinksIfOwnerMatch to FollowSymLinks and no joy. I'm working on mac OSX (SL) and installing in my user's "Sites" directo开发者_Python百科ry. I can access any files in this CMS directory via the web browser just not anything through symbolic links.
I hope konsolenfreddy's comment was helpful already. I am trying to round things up here:
- First check if the symlinks work from terminal and/or the filesystem in general.
- Also, if you use absolute paths, the whole path from root to the file in question must be readable by the Apache user. *
- If yes, check if the
AllowOverride
option is set for your webserver (or if applyable for the virtual host) For debugging you can setAllowOverride All
in either apache2.conf, httpd.conf or in sites-available/default - If yes, check if
FollowSymlinks
is aktivated in any of the files responsible for your webroot, starting with apache2 working yourself down to the .htaccess files. - Try changing file permissions on the symlink file and the target directory (or files)
- Try creating your own symlink and see what happens when you call it in the browser.
* Check this answer at askubuntu.com for more hints.
Ok I eventually solved it. In OSX the final file that governs access of sites installed in user directories is the last Include
line in the apache2/conf/extra/httpd-userdir.conf
file. Once I changed that my problems went away.
Thanks to all the people that replied my questions.
精彩评论