I've read up on this subject at so many resources but I'm still struggling to get this right. Background: I'm using an Amazon EC2 instance with a LAMP setup
I have this repo on bitbucket that has several directories: _fixtures
, oldfiles
, psds
, webfiles
. I only want to place the webfiles
directory above the webroot at /var/www/html/
. I've cloned the repo to my home folder and I've tried symlinking with
ln -s /home/myuser/myrepo/webfiles /var/www/html/webfiles
This is resulting in a 403 Forbidden access error. I've tried chmod
the webfiles folder to be owned by the apache group (so it would have read permission), but this doesn't help.
I also have
<VirtualHost *:80>
<Directory "/var/www/html">
allow from all
Options -Indexes FollowSymlinks
AllowOverride All
</Directory>
in my httpd.conf
to enable the symlinks, but still nothing. Any help on how I could accomplish this linking would be appreciated.
EDIT
Based on this SO thread+answer I will be taking the strategy of just checking out the webfiles
directory.
EDIT 2
It's been a while, but just thought I'd drop a note here saying that another solution I could have tried for this would be to clone the repo to somewhere like /var/www/repos/myrepo
and then symlink the webfiles
directory from there. It would be simpler since the permissions are more likely already in place for /var/www
.