Als eerste, doe deze na in je httpd.conf, vhosts.conf, of whatever:
<Directory /home/www>
Options FollowSymLinks IncludesNoExec
Order Deny,Allow
Allow from all
Options +Includes
</Directory>
...
NameVirtualHost *:80
...
<VirtualHost *:80>
ServerName www.mijnwebsite.nl
ServerAlias mijnwebsite.nl
DocumentRoot /home/www
Options MultiViews FollowSymLinks
Options MultiViews IncludesNoExec FollowSymLinks
Options +Includes
</VirtualHost>
<VirtualHost *:80>
ServerName sub.mijnwebsite.nl
DocumentRoot /home/www/subdomein
Options MultiViews FollowSymLinks
Options MultiViews IncludesNoExec FollowSymLinks
Options +Includes
</VirtualHost>
Vervolgens moet je je DNS records aanpassen bij je domeinnaam registar:
Voeg een A record toe, en geef het de waarde "sub", en je server IP adres als locatie.
Als dat gedaan is, voer deze commando in in je server:
httpd -S
Let op de hoofdletter S.