Apache 2 Symbolic link not allowed or link target not accessible

Posted by astropanic on Server Fault See other posts from Server Fault or by astropanic
Published on 2010-11-26T06:26:47Z Indexed on 2011/01/14 21:55 UTC
Read the original article Hit count: 221

Filed under:
|
|
|

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 ?

© Server Fault or respective owner

Related posts about apache2

Related posts about centos5