nginx fastcgi_param "HTTPS" missing from default configuration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nginx (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 10.10
Release: 10.10
Version: 0.7.67-3ubuntu1
For anyone new to nginx / FastCGI (over SSL), having the following "map $scheme" declaration in the default configuration would help prevent a lot of trial & error with upstream code depending on this being set:
e.g.
map $scheme $php_https { default off; https on; }
fastcgi_param HTTPS $php_https;
If the above map $scheme were added by default, the HTTPS fci param can easily be referenced (when necessary) without resorting to IF clauses, etc, trying to ensure it is present (and correctly set to off / on)
Expected:
$_SERVER['HTTPS'] to be set to "off" (for port 80) and "on" (for port 443)
Actual:
$_SERVER['HTTPS'] was not event set. Had to manually include as a fastcgi_param, and determine best way to conditionally set to "on" or "off"
This is now in the default configuration file.