Configuring per-user web directories

Ensure that the following command does not return emtpy result:

$ grep "Include mods-enabled\/" /etc/apache2/apache2.conf

Otherwise, add the following two lines in the /etc/apache2/apache2.conf file:

Include mods-enabled/userdir.load
Include mods-enabled/userdir.conf

Then execute the following commands:

$ cd /etc/apache2/mods-enabled/
$ sudo ln -s ../mods-available/userdir.load .
$ sudo ln -s ../mods-available/userdir.conf .
$ sudo apache2ctl -k start

References

  1. Apache2 documentation