Changed host from 'HTTP_HOST' to 'SERVER_NAME'