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 roots
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>
/etc/apache2/envvars as follows
export APACHE_RUN_USER=www-data export APACHE_RUN_GROUP=public
I made sure that /home/username/Videos/ and it's sub floders 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
Now, when I enter
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.