1

I have a VPS for hosting sites and I'm trying to get Apache to follow symlinks but cannot figure it out. I've Googled for the past couple hours and everything seems really confusing. I don't know anything about htaccess mod_rewrite engine so that's not available.

Basically, I have a resources folder that's not in the root directory of one of the sites, it's inside another directory but I'd like a symlink in the root so that it appears to be both in the root directory AND in that other directory.

So the original is /sub/resources and I want a symlink /resources to link to /sub/resources

Everything I try I get an Apache permission denied error. I'm creating the symlink with the root user using ln -s and setting permissions of the symlink to 755.

I've tried adding Options +FollowSymlinks to my root .htaccess file. Also tried going to the httpd.conf file and ensuring it has

<Directory />
    Options FollowSymLinks
    AllowOverride Indexes
</Directory>

Very frustrating. Any suggestions?

Thanks,

Scott

twistedpixel
  • 1,212
  • 4
  • 14
  • 33
  • My suggestion would be to try and change the permission of the actual file that the symlink points to and see if you still get the error. Changing permissions of a symlink only affects operations that reference the symlink. If you/apache do not have read permissions for the actual file you're pointing to, you will still get a permission denied error. – Alex W May 22 '12 at 01:55
  • The resources directory and its contents are all 755 and are accessible directly via http url so unfortunately it's not that :( – twistedpixel May 22 '12 at 02:09
  • Are the files readable by the 'apache' user and 'apache' group? Also, make sure SELinux is not enabled as it will deny those directory paths – Alex W May 22 '12 at 02:38
  • Yeah, the files are readable just fine. Any other things I could maybe check? – twistedpixel May 22 '12 at 23:19

0 Answers0