0

So I have an Apache server on my raspberry pi running Raspibian, where its root is at /var/www and I've created a symlink in www called downloads which links to /home/pi/downloads.

First of all, I've followed this tutorial but I couldn't get my apache to list the symlink directory. Whenever I access localhost I get only the list of files at /var/www but not the symlink.

Also, I tried, just to see what happens, to change the root directory to /home/pi/downloads and when I access the localhost I get 403 forbidden. I want to know why I can't see the symlink and why I'm getting the forbidden error for the /home/pi/downloads. Maybe Apache has to have the right to read that folder? How do I make it possible?

What I really want to do is: list my symlinks and be able to access the symlinks without getting forbidden error

1

1 Answer 1

2

I'm guessing you have the FollowSymlinks directive in place, since that's what the tutorial covers. Then the other consideration is that the www-data user needs to have execute access on the directory that the symlink points to (/home/pi/downloads).

If www-data belongs to the group that owns /home/pi/downloads, then you can do chmod g+x /home/pi/downloads and Apache should immediately gain access to that directory.Otherwise, if you don't mind allowing all users to access the directory, you can do chmod o+x /home/pi/downloads.

See here and here for similar posts.

You must log in to answer this question.

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