Fix detection of https for nginx