1

I have configure the httpd.conf in Apache (httpd-2.2.17-1.fc14.x86_64) on FC14 to point to a symlink that exists in the users home directory by adding the following config to the httpd.conf.

<VirtualHost *:80>
    ServerName site.test.co.uk
    DocumentRoot /var/www/html/site.test.co.uk
    <Directory "/home/userA/www/site.test.co.uk">
            AllowOverride None
            Options Indexes FollowSymLinks MultiViews
            Order allow,deny
            allow from all
    </Directory>
</VirtualHost>

I have then used the command

ln -s /var/www/html/site.test.co.uk /home/user/www/site.test.co.uk

I have give the user userA access to the directory structure and ownership of the folders in the home dir (I was logged in as root). I have also given the group apache access to the group userA and restarted httpd.

This issue I have is that when I view the site site.test.co.uk I get a 403 Forbidden error?

I can cd to the directory via the symlink and that works fine but apache does not seem to be able to access the symlink.

Thanks in advance.

2 Answers 2

1

Try cding to the folder using the Apache user,

Most likely its your home directory permissions, or permission somewhere on the top level

su apache
cd home
cd user
cd www
cd site.test.co.uk

If it fails, you need to add apache to the group of user and make sure the directory has Group read and write permission drwxr-x--- or 750

chmod -R 750 /home/user
2

Your Options directive tells Apache to follow symlinks inside that directory, while you're attempting to follow a symlink to that directory. You'll need to set this directive in directory above the symlink, though I'm not sure off the top of my head if this works for the docroot.

You're already configuring the destination of the symlink directly in the Apache config file, so why not just set that as the docroot?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .