Fixed issue with HTTP_HOST not being set when running via the cli.