I had set up 2 domain virtualhost files under /etc/apache2/sites-available,
apart from the default configurations. I've been trying to create a redirection from example.com to www.example.com and it doesn't seem to work, I don't know where I'm going wrong.
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName www.example.com DocumentRoot /var/www/project </VirtualHost>
<VirtualHost *:80> ServerName example.com ServerAdmin firstname.lastname@example.org DocumentRoot /var/www Redirect / http://www.example.com/ </VirtualHost>
After adding them, I had configured with "a2ensite" and restarted Apache. But the redirection doesn't work.