Simply run sudo a2enmod rewrite && sudo invoke-rc.d apache2 restart