New Supermarket Announcements!

Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the supermarket mailing list.

Select Supported Platforms


passenger_apache2 (17) Versions 2.3.0

Installs passenger for Apache2

cookbook 'passenger_apache2', '~> 2.3.0'
cookbook 'passenger_apache2', '~> 2.3.0'
knife cookbook site install passenger_apache2
knife cookbook site download passenger_apache2

passenger_apache2 Cookbook

Build Status Cookbook Version

Installs Phusion Passenger Ruby application server for Apache 2.



  • Debian/Ubuntu
  • RHEL/CentOS/Scientific/Amazon/Oracle
  • Fedora
  • Arch
  • openSUSE/SLES


  • Chef 11+


  • apache2 >= 2.0.0
  • build-essential >= 2.0.0


  • node['passenger']['version'] - Specify the version of passenger to install.
  • node['passenger']['max_pool_size'] - Sets PassengerMaxPoolSize in the Apache module config.
  • node['passenger']['root_path'] - The location of the passenger gem.
  • node['passenger']['ruby_bin'] - Sets PassengerRuby in the Apache module config and is used for passenger module configuration. Defaults to node['languages']['ruby']['ruby_bin'].
  • node['passenger']['module_path'] - The location of the compiled passenger apache module.
  • node['passenger']['install_method'] - Includes the "source" (gem install) or "package" recipe. Default "source."
  • node['passenger']['apache_mpm'] - Override with an "override_attribute" (in a role, environment or with node.override) to "worker" or "threaded" to use apache2-threaded-dev package. Otherwise this assumes prefork.
  • node['passenger']['package']['name'] - Name of the package for passenger, default is nil, so this must be set before using the "package" install method/recipe.
  • node['passenger']['package']['version'] - Specify the version of the passenger package to install. Uses version attribute above by default. To install the version available by default (latest, usually), delete the attribute in a recipe with this line:
  • node['passenger']['install_module'] - Specify the boolean value which decides installing Passenger. Defaults to true, and setting to false skips the installation



Installs passenger from gem (source) or package depending on the value of the install_method attribute.


Installs the passenger gem and enables the module in Apache2.


Installs passenger as a RubyGem.


Installs passenger as a Package.

Set the install_method attribute to package, then set the package['name'] attribute to the correct package for your platform. The recipe does not yet handle adding yum repositories for RHEL platforms, so that should be done in another recipe until COOK-2414 is resolved.

Set the node['passenger']['package']['version'] attribute to the correct value for your system's available package repository if necessary. By default the value is nil which will install the latest package version from the distribution package manager.


For example, to run a Rails application on passenger:

include_recipe "rails"
include_recipe "passenger_apache2"

web_app "myproj" do
  docroot "/srv/myproj/public"
  server_name "myproj.#{node[:domain]}"
  server_aliases [ "myproj", node[:hostname] ]
  rails_env "production"

A sample config template is provided, web_app.conf.erb. If this is suitable for your application, add 'cookbook "passenger"' to the define above to use that template. Otherwise, copy the template to the cookbook where you're using web_app, and modify as needed. The cookbook parameter is optional, if omitted it will search the cookbook where the define is used.

License & Authors

Copyright: 2009-2015, Chef Software, Inc
Copyright: 2009, 37signals
Copright: 2009, Michael Hale

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

build-essential >= 0.0.0
apache2 >= 2.0

Contingent cookbooks

application Applicable Versions
application_ruby Applicable Versions
chef Applicable Versions
gitorious Applicable Versions
instiki Applicable Versions
jently Applicable Versions
open-build-service Applicable Versions
radiant Applicable Versions
redmine Applicable Versions
stoplight Applicable Versions

passenger_apache2 Cookbook CHANGELOG

This file is used to list changes made in each version of the passenger_apache2 cookbook.

v2.3.0 (2015-09-23)

  • Update Apache 2 requirement from 1.X.X to >= 2.0.0 which adds support for current Ubuntu and CentOS releases
  • The minimum supported Chef release is now 11.0
  • Added support for Fedora and openSUSE / SLES
  • Update source recipe to not upgrade packages. Package upgrades should be done outside community cookbooks and not randomly during Chef runs.
  • Add chef standard gitignore and chefignore files
  • Add a .foodcritic file to exclude rules that aren't valid for this cookbook
  • Update Kitchen CI config for new platforms and format
  • Add Rubocop config
  • Add Travis CI config
  • Update Berksfile to 3.X format and remove Yum, which wasn't actually used
  • Update Contributing, Testing, and Maintainers docs
  • Add Rakefile for simplified testing
  • Update Gemfile with updated testing and development gems
  • Replace all references to Opscode with Chef Software
  • Add Travis CI and cookbook version badges to the Readme

v2.2.3 (2014-12-07)

  • Fix idempotence check to check for existence of the right file, at the right time (#34, #37, #42)
  • Constrain apache2 cookbook version (#32, #33)
  • Update passenger version to latest bugfix release (4.0.53)

v2.2.2 (2014-08-25)

  • COOK-4666 Include attribute conditional check to install module

v2.2.0 (2014-02-21)


  • COOK-4081 - Install command does not use correct attribute


  • COOK-4005 - Make the passenger apache module installation step use optional custom ruby when building from source



  • [COOK-4005] Make the passenger apache module installation use optional custom ruby when building from source



  • [COOK-3706] Fix permission of passenger.load
  • [COOK-3747] Call full path for installing module



  • COOK-3654 - Fix compatibility with Chef 11
  • COOK-3395 - Fix an issue where the recipe does not compile the version of passenger specified on the node attribute


  • COOK-3486 - Make PassengerRuby configurable



  • COOK-2293 - Automatically reload Ohai attribtues



  • [COOK-2750]: using mod_rails in run_list by itself fails in version 2.0.0
  • [COOK-2972]: passenger_apache2 has foodcritic errors
  • [COOK-3180]: don't use mod_rails recipe w/ package install


[COOK-2115] - Improve passenger_apache2 cookbook source [COOK-2128] - Allow apache passenger to be installed via packages [COOK-2203] - Remove :source key from module_path [COOK-2379] - passenger_apache2 should install passenger 3.0.19 [COOK-2380] - pasenger_apache2 should use platform_family for additional platform support


  • [COOK-2003] - only able to use apache2-prefork-dev to compile passenger


  • [COOK-1097] - documentation missing for mod_rails recipe
  • [COOK-1132] - example doesn't work
  • [COOK-1133] - update to passenger v3.0.11


  • [COOK-958] - fix regression for loadmodule on debian/ubuntu
  • [COOK-1003] - support archlinux


  • [COOK-859] - don't hardcode module path
  • [COOK-539] - use --auto for installation
  • [COOK-608] - remove RailsAllowModRewrite from web_app.erb
  • [COOK-640] - use correct development headers on RHEL


  • Upgrade to passenger 3.0.7
  • Attributes are all "default"
  • Install curl development headers
  • Move PassengerMaxPoolSize to config of module instead of vhost.

2.3.0 passed Foodcritic.