If Apache2 does not serve symlinks

2015-03-23 | #solution, #ubuntu, #webdev

In general, serving stuff via symlink is straight forward in Apache:

Make sure that your VirtualHost generally follows symlinks:

<Directory "/foo/bar">

Options FollowSymLinks

AllowOverride None

Require all granted

</Directory>

If the Apache throws a "403 Forbidden" after this, cd into your linked dir and step up the directory hierarchy, making sure, that all directories up to the root are executable by all users.

You can set this by applying "sudo chmod go+x" to those dirs. If you want to be a little bit broader, also allowing to read directory contents use "go+rx".