Create local folder symlink to Apache

Let's say you have a folder somewhere on your local machine and you want Apache to serve your website from this folder.

First, remove the html directory with:

sudo rm -rf /var/www/html

Next, create the symlink:

sudo ln -s /home/USERNAME/FOLDER_TO_LINK/ /var/www/html

By default Apache doesn't allow Symlinks, so you'll need to edit the apache2.conf file:

sudo nano /etc/apache2/apache2.conf

Change the following:

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

Replace with:

<Directory />
        Options +FollowSymLinks
        AllowOverride None
        Require all denied
</Directory>

Note the + in front of FollowSymLinks