# auto detect and enable fastcgi_param HTTPS $server_http # for PHP behind SSL https map $scheme $server_https { default off; https on; }