Apache 2 Symbolic link not allowed or link target not accessible
- by astropanic
My apache server runs as user foo.
I have some Rails applications in /home/foo/app1 /home/foo/app2.
Each of them has an vhost
<VirtualHost *:80>
ServerName app1.foobar.com
ServerAlias www.app1.foobar.com
DocumentRoot /var/www/html/app1/current/public
RailsEnv production
<Directory /var/www/html/app1/current/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
I have a symlink in /var/www/html/app1 :
current -> /home/foo/app1/tmp_20102611
All file permissons are set correctly (user foo group foo), I can go through the filesystem from shell.
SELINUX is disabled
Distro is CentOs 5.5
Which the above symlink I get an 403 and an error entry in error_log
Symbolic link not allowed or link target not accessible:/var/www/html/app1/current
When I symlink my app in the subdir of /var/www/html instead of /home/foo it works.
How I can avoid this error still placing my app in my /home/foo directory ?