nginx fastcgi_param "HTTPS" missing from default configuration

Bug #857831 reported by Mike Reid
6
This bug affects 1 person
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"

Revision history for this message
Michael Lustfield (michaellustfield) wrote :

This is now in the default configuration file.

Changed in nginx (Ubuntu):
status: New → Fix Committed
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.