Apache won't follow Symlink

Posted by Marvin Dickhaus on Server Fault See other posts from Server Fault or by Marvin Dickhaus
Published on 2012-11-20T16:57:35Z Indexed on 2012/11/20 17:03 UTC
Read the original article Hit count: 252

Filed under:
|
|

I have a LAMP server (Ubuntu 12.10) setup on my development machine. It is a T60 modified with an SSD.

The server base is in /var/www. Apache has the following config:

DocumentRoot /var/www
<Directory />
  Options FollowSymLinks
  AllowOverride None
</Directory>
<Directory /var/www/>
  Options Indexes FollowSymLinks MultiViews SymLinksIfOwnerMatch
  AllowOverride all
  Order allow,deny
  allow from all
</Directory>

I'm currently developing a SilverStripe CMS featured site. The folder for the server is /var/www/sfk/. The framework and all cms relavant features are in their respective folders. The only folder that need to be modified would be the /var/www/sfk/mysite folder. Because of that I want to keep the mysite folder under my home directory and symlink it into the server folder. So here is what I've done:

ln -s ~/sfk/mysite/ /var/www/sfk/
sudo chgrp www-data /var/www/sfk/mysite -R

ls tells me the following:

/var/www/sfk (exerpt)

drwxr-xr-x  3 marvin www-data 4096 Nov 16 16:53 assets
drwxr-xr-x 12 marvin www-data 4096 Nov 16 16:53 cms
drwxr-xr-x 29 marvin www-data 4096 Nov 16 16:53 framework
-rw-r--r--  1 marvin www-data 2410 Nov 16 16:53 index.php
lrwxrwxrwx  1 marvin www-data   24 Nov 20 17:45 mysite -> /home/marvin/sfk/mysite/
-rw-rw-r--  1 marvin www-data  514 Nov 16 16:55 _ss_environment.php
drwxr-xr-x  4 marvin www-data 4096 Nov 16 16:53 themes

and

ls /var/www/sfk/mysite/

drwxrwxr-x 6 marvin www-data 4096 Nov 16 00:15 code
drwxrwxr-x 2 marvin www-data 4096 Nov 16 11:51 _config
-rwxrwxr-x 1 marvin www-data 2685 Nov 16 15:39 _config.php
drwxrwxr-x 2 marvin www-data 4096 Nov 16 00:15 css
drwxrwxr-x 2 marvin www-data 4096 Nov 16 00:15 images
drwxrwxr-x 2 marvin www-data 4096 Nov 16 00:15 javascript
drwxrwxr-x 5 marvin www-data 4096 Nov 16 00:15 templates

This is literally the same setup I have on my desktop machine. The problem I have is that the mysite/ folder is just not recognized. I'm thankful for every advice I get. I'm frustrated because I'm stuck with this issue for hours.

© Server Fault or respective owner

Related posts about linux

Related posts about apache2