We assume you have a project on /~nameproject/www/name_of_my_project/
Now you would like to make it accessible from the outside e.g. At name_of_your_project.fabelier.org , and thus to use virtual-host for that.
$ sudo vi /etc/apache2/sites-available/name_of_your_project
<VirtualHost *:8080>
ServerName name_of_your_project.fabelier.org
ServerAlias name_of_your_project.fabelier.org
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Alias my_project "/~nameproject/www/name_of_my_project/"
<Directory "/~nameproject/www/name_of_my_project/">
Options MultiViews
AllowOverride None
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Then:
$ sudo service apache2 restart
Configure on your hosting provider the domain name and dns redirection if needed.
Enjoy your new virtual host!