I\'m trying to automate some new site deployment in my testing environment. My script auto generates the apache vhost file in
/etc/apache2/sites-available/tests
a2ensite's man page doesn't mention it explicitly, but you actually should supply just a name of the site to be enabled, like...
a2ensite testsite.com
... and not the whole path to it.