Use the nginx variable to read the hostname instead of the request header