# http://www.domain.com
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.domain.com
ServerAlias domain.com
DocumentRoot /var/www/projects/path/to/site
<Directory /var/www/projects/path/to/site>
#Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
</VirtualHost>
# http://subdomain.domain.com
<VirtualHost *:80>
ServerName subdomain.domain.com
DocumentRoot /var/www/path/to/subdomain
<Directory /var/www/path/to/subdomain>
#Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
</VirtualHost>