Reputation: 1609
I am using apache 2.4
and ubuntu 15.10
.
I want to change default /var/www/html/
directory for my files into /home/myuser/mydir/
. I know there are many tutorials, but it doesn't seem to work.
I changed 000-default.conf
:
ServerAdmin webmaster@localhost
# DocumentRoot /var/www/html
DocumentRoot /home/myuser/mydir
# <Directory /var/www/html>
<Directory /home/myuser/mydir>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
I changed default-ssl.conf
:
ServerAdmin webmaster@localhost
# DocumentRoot /var/www/html
DocumentRoot /home/myuser/mydir
I changed apache.conf
:
# <Directory /var/www/html>
<Directory /home/myuser/mydir>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
ls -l
in /home/myuser/mydir
is solid: -rwxrwxrwx
If I restart apache2 and access "localhost" in my browser I get:
Forbidden
You don't have permission to access / on this server.
Apache/2.4.12 (Ubuntu) Server at localhost Port 80
I don't know what else I can do.
Upvotes: 0
Views: 2864