When upgrading from 3.4 to 3.5 (using the Ubuntu repository), We get this error in the log when trying to reload or restart nginx:

Reloading nginx configuration: nginx: [emerg] unknown "status" variable

Status is used in two places in /var/aegir/config/includes/nginx_vhost_common.conf

add_header X-Response-Status "$status";

and

fastcgi_cache_key "$is_bot$device$host$request_method$key_uri$cache_uid$http_x_forwarded_proto$sent_http_x_local_proto$cookie_respimg$status";

Commenting out the add_header line and removing $status from the 2nd line allows nginx to start.

Using nginx version 1.2.1

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

millenniumtree created an issue. See original summary.

millenniumtree’s picture

Project: Aegir Hosting CiviCRM » Provision
Version: 7.x-3.5 » 7.x-3.6

Had this in the wrong project

memtkmcc’s picture

Assigned: Unassigned » memtkmcc

Right, it looks like we don't check Nginx version / compatibility properly here. Besides, this addition proved useless, because it never gets added to the cache key.

memtkmcc’s picture

Version: 7.x-3.6 » 7.x-3.x-dev
Component: Code » HTTP Service
Status: Active » Needs review
FileSize
3.58 KB

Attached patch should fix the problem.

millenniumtree’s picture

NICE - thanks for that!

How do I force a template rebuild after patching?

memtkmcc’s picture

It should be enough to re-verify the web server (node) to force it to use patched templates. Or just:

su -s /bin/bash aegir -c "drush @hm hosting-task @server_master verify --force"

memtkmcc’s picture

Assigned: memtkmcc » Unassigned
Status: Needs review » Reviewed & tested by the community

This can be marked as RTBC.

  • helmo committed c1ec776 on 7.x-3.x authored by memtkmcc
    Issue #2738983 by memtkmcc: Nginx unknown status variable
    
helmo’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.