Welcome! Log In Create A New Profile

Advanced

Re: $https variable?

September 24, 2011 03:28AM
Igor proposed this a while ago:

on the global level (in http{} block)
map $scheme $php_https { https on; http off; }

then in fastcgi_params
fastcgi_param HTTPS $php_https;



On Sat, Sep 24, 2011 at 12:12 AM, Luke Scott <luke@visionlaunchers.com> wrote:
> It would be great if there was an $https variable that was "on" or "off" (or "") so you could do something like this:
>
> fastcgi_param  HTTPS $https;
>
> Because currently telling PHP https is enabled is much harder, especially for those that prefer to have a single server{} block for both HTTP and HTTPS.
>
> Typically PHP uses $_SERVER['HTTPS'] === 'on' to detect whether or not HTTPS is enabled.
>
> http://us3.php.net/manual/en/reserved.variables.server.php
>
> Luke
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

$https variable?

Luke Scott September 24, 2011 03:14AM

Re: $https variable?

Andrey N. Oktyabrski September 24, 2011 03:26AM

Re: $https variable?

mike September 24, 2011 03:28AM

Re: $https variable?

locojohn September 28, 2011 07:25AM

Re: $https variable?

António P. P. Almeida October 04, 2011 07:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 277
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready