I know this question is asked a lot, but the solutions I saw didn't work for me.
I only have one virtual host enabled, and I'm trying to enable access to a folder that's not under the document root
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
Alias /movies /home/username/Videos/Movies
<Directory /home/username/Videos/Movies/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
I set /etc/apache2/envvars
as follows
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=public
I made sure that /home/username/Videos/ and its sub folders are owned by username:public
, set the permissions to 777 (after 775 didn't work) and made sure that user www-data
belongs to group public
.
Now, when I browse to http://localhost/movies
I get
[Mon Apr 21 11:28:14.971844 2014] [core:error] [pid 1385:tid 140067725104896] (13)Permission denied: [client 127.0.0.1:46603] AH00035: access to /movies/ denied (filesystem path '/home/username/Videos') because search permissions are missing on a component of the path
But when I set /etc/apache2/envvars
to run Apache under username
(my own username) everything works fine. The problem is permission related, but I don't see how in my case; especially when I set the permissions to 777
. Any ideas?
P.S. Ubuntu version is 14.04, Apache is 2.4.7 and I didn't edit other configuration files.
/home
with ACL enabled? (there is a "+" sign at the end of the permission bits if it's the case (check withls -l
))