Revert "Fix previous commit by using SERVER_NAME instead of HTTP_HOST"

This reverts commit ba2974a603020ed18a75df717a3faa659163276a.