[docs] Preamble is not needed to fix HTTPS client/server error

When we see an error like this:

Phabricator thinks you are using HTTP, but your client is conviced that it is using HTTPS. This is a serious misconfiguration with subtle, but significant, consequences. See Documentation

The docs advise to use $_SERVER['HTTPS'] = true;.

This is incorrect in the situations where Nginx is used with PHP-FPM. Instead one should use fastcgi_param HTTPS on; in the Nginx configuration.

This seems like a documentation bug. We should not blatantly tell PHP that HTTPS is on all the time. We should have Nginx, which is fronting the SSL certificate and https connection, tell PHP when HTTPS is in use.

2 Likes

Thanks man, I was getting desperate with this issue!
That indeed fixes the issue I had when running in HTTP with Nginx/PHP-FPM behind a SSL terminating Nginx reverse-proxy.