Forum Moderators: phranque

Message Too Old, No Replies

Apache2 FollowSymLinks issue

         

tamcclen

3:03 pm on May 9, 2006 (gmt 0)

10+ Year Member



I am having trouble with the default install of Fedora Core 5 and apache2.

I usually create a new user for each website I will host then create a symlink from the users directory:

i.e. /home/mynewuser/public_html

straight to the documentroot

i.e. /var/www/html/newdomain

That way any files uploaded are directly live on the site. This is how I had things working with no issue in Fedora Core 3 default install.

The httpd.conf's are exactly the same, yet I get a 403 Error and the page cannot be displayed. The error log clearly states it is because the SymLink cannot be followed.

I have SELinux=disabled

Is there anything else that could be affection the symlink that I am missing?

Thanks,

Andrew

StupidScript

10:01 pm on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome, tamcclen!

I realize you noted that your httpd.conf files are identical on the old and new systems, but typically that error is the result of a missing directive in the server's config file. Something like:

<Directory /var/www/html/newdomain>

Options FollowSymLinks

</Directory>

Is that included in the proper places (one for each user directory, as you described)?

You also want to make sure the permissions on the user directories are useable by Apache. It's possible that the new installation has tighter control than the old one, and while FollowSymLinks is in place and the link (really a symbolic one, right?) uses a valid path, if Apache doesn't have permission to access the user's directory then the link will fail.

jdMorgan

1:20 pm on May 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And note also that you may want to *add* the FollowSymLinks option to those already in effect in a wider scope:

<Directory /var/www/html/newdomain>
Options [b]+F[/b]ollowSymLinks
</Directory>

Without the "+", the directive would disable any other options already set, for example, at the whole-server level.

Jim