What you'll need is the Apache VirtualHost directive.
See the Apache Documentation and some Examples.
Basically what you want to do in Ubuntu is to make sure, that the port you want to use (usually :80) is enabled in /etc/apache2/ports.conf like this:
Next you'll have to create a new conf-file in /etc/apache2/sites-available.
I'd suggest to name it proj1.conf or proj1.mydomain.conf.
There you can configure the VirtualHost as follows:
# Write a seperate log per Virtualhost
CustomLog /var/log/apache2/proj1.subdomain.access_log combined
# Maybe you want to put some restrictions on the directory
Options -Indexes +FollowSymLinks + Includes
# Restrict Access to certain IP's
Deny from All
Allow from 127.0.0.1 IP IP IP
Consult the Apache Manual to see what you could do with the Directive.
To enable this Site, link it to /etc/apache2/sites-enabled
ln -s /etc/apache2/sites-available/proj1.conf /etc/apache2/sites-enabled/proj1
Now all you have to do is make sure your config is valid and then restart Apache:
apache2ctl configtest && /etc/init.d/apache2 restart
Naturally you will have to set up the subdomain in your DNS in a way that it points to this server.