In the sites-enabled folder /etc/apache2/sites-enabled, edit 000-default (this is actually a symbolic link to etc/apache2/sites-available/default, which will need to be made editable before making changes). You will need to add the statement:
ln -s ../mods-available/rewrite.load
to the directory blocks for '/' and '/var/www'. If these blocks do not contain the statement:
then add it at the end. Make sure that any occurrence of AllowOverride None within these blocks is changed, commented or deleted.
Allow from all