sudo a2enmod rewrite
sudo a2enmod rewrite
then
sudo service apache2 restart
sudo a2enmod rewrite
sudo nano /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
Por
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
sudo /etc/init.d/apache2 restart
Check the spelling in the virtual host