I'm trying to migrate an elastic beanstalk app from Puma to Phusion Passenger. However, Passenger fails at startup with the error:
/opt/elasticbeanstalk/support/conf/nginx_config.erb:48:in `block in write_nginx_config_file': undefined local variable or method `location_config_filename' for #<PhusionPassenger::Standalone::StartCommand:0x007f1eb35d06f0> (NameError) from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `eval' from /opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/erb.rb:863:in `result' from /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/passenger-5.0.15/lib/phusion_passenger/standalone/start_command/nginx_engine.rb:120:in `block in write_nginx_config_file'
The Amazon stack name is:
64bit Amazon Linux 2015.03 v2.0.0 running Ruby 2.2 (Passenger Standalone)
The same app runs locally and on Heroku using Passenger. (It also runs OK with Puma).
Is there a required configuration file or configuration option I've missed?
(I'm using eb_deployer for blue-green deployment rather than the AWS Console – so it might be a default somewhere).