How do I create the project outside the /var/www/ directory?
I would use an Alias:
Alias /hello-world /home/www/foo
<Directory "/home/www/foo">
Options -MultiViews -FollowSymLinks +SymLinksIfOwnerMatch
AllowOverride all
</Directory>
Enable FollowSymlinks in your Apache-config and make a symbolic link on your file system.
ln -s /path/to/your/project /var/www/projectname
And replacing the content is easy, without having to reload the server
rm /var/www/projectname
ln -s /path/to/your/project-v2 /var/www/projectname