Regarding setting ENV variable

Valentin V. Bartenev ne at
Thu Mar 8 11:46:46 UTC 2012

On Thursday 08 March 2012 10:07:35 shivnamha wrote:
> Hi Alexandr
>                  Thanks Alexander.But I didnt get u completly. I tried
> by adding a 'fastcgi_param HTTPS      on;'  but this variable is getting
> set for http request as well for https request. But i need to set for
> https request. Can u please elaborate ur statement so that i can easily
> understand it.

    fastcgi_param HTTPS $https if_not_empty; # for NGINX >= 1.1.11

For NGINX < 1.1.11:

    map $scheme $https_on {
        default  '';
        https    on;

    fastcgi_param HTTPS $https_on;

  wbr, Valentin V. Bartenev

More information about the nginx mailing list