nginx fastcgi_param "HTTPS" missing from default configuration

Bug #857831 reported by Mike Reid on 2011-09-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nginx (Ubuntu)

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:

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)


$_SERVER['HTTPS'] to be set to "off" (for port 80) and "on" (for port 443)


$_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.

Changed in nginx (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nginx - 1.1.8-1

nginx (1.1.8-1) unstable; urgency=low

  [Kartik Mistry]
  * New upstream release.
  * debian/modules/chunkin-nginx-module:
    + Removed as of now, as it breaks with Perl 5.14 (Closes: #649061)

  [Michael Lustfield]
  * debian/control:
    + Added Map module to nginx-light modules list.
  * debian/rules:
    + Removed --without-http_map_module form nginx-light.
  * debian/nginx-common.install:
    + Changed ufw profile installation (LP: #825349).
      - debian/ufw.profile -> debian/ufw/nginx.
  * debian/nginx-common.preinst:
    + Cleanup of moved nginx profile.
  * debian/conf/nginx.conf:
    + Added a default map for $server_https (on|off).
  * debian/conf/fastcgi_params:
    + Pass HTTPS so $_SERVER['HTTPS'] is set (LP: #857831).
  * debian/conf/mime.types:
    + Added json type (LP: #883440).
  * debian/conf/sites-available/default:
    + Added notes about PHP (Closes: #642995).
    + Changed location /doc from root to alias.
    + Changed location /doc to /doc/ for people that don't bother reading or
      learning anything about Nginx configuration files (LP: #840358).

 -- Kartik Mistry <email address hidden> Fri, 18 Nov 2011 23:44:00 +0530

Changed in nginx (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers