LAMPP, VirtualHosts and ELGG problem

Hi people! I'm having this problem but I can't find any solution. I have two more virtualhosts working perfectly but I can't get this to work. I'm using LAMPP over Ubuntu, so my www directory is "/opt/lampp/htdocs/". I made a test page with just an html like this and it worked:

 <VirtualHost 127.0.0.1>

  ServerName test.dev

  DocumentRoot "/opt/lampp/htdocs/test"

  DirectoryIndex index.html

  <Directory "/opt/lampp/htdocs/test">

    AllowOverride All

    Allow from All

  </Directory>

</VirtualHost>

Then I made the same for my elgg site:

<VirtualHost 127.0.0.1>

  ServerName elggsite.dev

  DocumentRoot "/opt/lampp/htdocs/elggsite.dev"

  DirectoryIndex index.php

  <Directory "/opt/lampp/htdocs/elggsite.dev">

    AllowOverride All

    Allow from All

  </Directory>

  ServerSignature On

</VirtualHost>

 After that, I've edited the db.

In elgg_sites_entity ---> url = http://elggsite.dev (I've tried also http://localhost/elggsite.dev)

In elgg_datalist ---> path = /opt/lampp/htdocs/elggsite.dev

                          ---> dataroot = /opt/lampp/data

And in metastring the dataroot modified too.

And the only thing I get is Error 310 (net::ERR_TOO_MANY_REDIRECTS): Demasiados redireccionamientos.

So what could it be? Any help would be much appreciated.