1. Add the * inside the dns zone file of the domain.
==> * IN A IP
2. Edit /var/www/vhosts/domainname.com/conf/vhost.conf and add the line
==> ServerAlias *.domainname.com
3. Run the following command.
==> /usr/local/psa/admin/bin/websrvmng -a -v
4. Restart apache.
That's it