0

I am need for apache to have access on all (well... most anyway) user folders on the same machine, so that I can access some data, do some magic and then display them on a webpage for remote viewing.

What I thought would be the simplest solution is to create a dir alias that points to /home folder and allowing it to be accessed only locally, since all the "magic" will be happening server side and only the results will be shown. Problem is I cannot make the Alias to work.

I added the following in my /etc/apache2/mods-enabled/alias.conf to check if it is working:

Alias /home/ "/home"
<Directory "/home">
     Options Indexes MultiViews FollowSymLinks
     AllowOverride None
     Require all granted
</Directory>

but I'm getting a 403 Forbidden. I also tried adding it as a virtual host on sites-enabled/000-default.conf and apache2.conf neither of which worked.

I also added www-data to a user group that has access to /home, just to be sure.

What am I missing here?

2
  • 1
    Try the solution here.. askubuntu.com/questions/36533/…
    – user508889
    Apr 15, 2016 at 16:45
  • I gave 751 to /home, nothing changed, I even tried changing it to my user home dir and changing everything in there to give ex to all users and make /home point to it, still nothing. I also added a sub folder in my root site with the same name, but it does not access that, anything else I may have overlooked?
    – Ant
    Apr 15, 2016 at 21:52

1 Answer 1

0

Instead of fiddling with all those files, I simply did the following two steps:

  1. added the folders I needed to a group in which www-data is a member of and granted the group both read and execute permissions (for some reason execute was not enough), thanks Brian
  2. Added what I originally had in my alias.conf to apache2.conf

Obviously I first removed all the havoc I had created in my previous attempts.

You must log in to answer this question.

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