added active agent template and wrapped shell in logic to handle default vhost