Added support for automatic replacement of hostname in virtual host template.