This question already has an answer here:
Apache/2.4.18 (Ubuntu) Ubuntu 16.04
I tested the initial configuration, pointed my browser to the server, and got the normal ubunutu page. Works fine.
The 000-default.conf is:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/html </VirtualHost>
The index.html is in the /var/www/html directory and the /var/www/html directory has permissions set to 0755
I created a directory /home/utils/rails/public, owned the user utils. I set the permissions for this directory to 0755
I copied the file index.html from /var/www/html to /home/utils/rails/public
I then modified the /etc/apache2/sites-available/000-default.conf to the following:
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/utils/rails/public </VirtualHost>
I restarted apache2 and pointed the browser to the location, but this time I got the
Forbidden You don't have permission to access / on this server
If I reverse the procedure, and change the DocumentRoot back to /var/www/html, everything works fine.
What am I doing wrong?
namei -lx /home/utils/rails/public f: /home/utils/rails/public Drwxr-xr-x root root / drwxr-xr-x root root home drwxr-xr-x utils utils utils drwxrwxr-x utils utils rails drwxr-xr-x utils utils public