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 Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


nginx_simplecgi (7) Versions 0.3.4

Provides SimpleCGI for NGINX

cookbook 'nginx_simplecgi', '~> 0.3.4', :supermarket
cookbook 'nginx_simplecgi', '~> 0.3.4'
knife supermarket install nginx_simplecgi
knife supermarket download nginx_simplecgi
Quality 50%

nginx_simplecgi cookbook

Cookbook Version
Build Status

This cookbook provides CGI support for NGINX via SimpleCGI.


This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit or come chat with us on the Chef Community Slack in #sous-chefs.



  • Debian/ Ubuntu
  • RHEL based platforms (CentOS, Redhat, etc)


  • Chef 12.19+


  • nginx
  • perl
  • runit
  • yum-epel



  • node['nginx_simplecgi']['cgi'] -> Enable CGI dispatch
  • node['nginx_simplecgi']['php'] -> Enable PHP dispatch
  • node['nginx_simplecgi']['php_cgi_bin'] -> PHP executable path for CGI
  • node['nginx_simplecgi']['init_type'] -> Init style for dispatchers
  • node['nginx_simplecgi']['dispatcher_directory'] -> Directory to contain socket and pid files
  • node['nginx_simplecgi']['dispatcher_processes'] -> Number of dispatcher processes for handling requests

Template Helper

A template method helper, dispatch is provided to add the require location block into your nginx configuration files:

<%= nginx_dispatch(:cgi) %>

The default call will output:

  location ~ ^/cgi-bin/.*\.cgi$ {
    gzip off;
    fastcgi_pass  unix:/var/run/nginx/cgiwrap-dispatch.sock;
    fastcgi_index index.cgi;
    fastcgi_param SCRIPT_FILENAME /usr/lib$fastcgi_script_name;
    fastcgi_param QUERY_STRING     $query_string;
    fastcgi_param REQUEST_METHOD   $request_method;
    fastcgi_param CONTENT_TYPE     $content_type;
    fastcgi_param CONTENT_LENGTH   $content_length;
    fastcgi_param GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param SERVER_SOFTWARE    nginx;
    fastcgi_param SCRIPT_NAME        $fastcgi_script_name;
    fastcgi_param REQUEST_URI        $request_uri;
    fastcgi_param DOCUMENT_URI       $document_uri;
    fastcgi_param DOCUMENT_ROOT      $document_root;
    fastcgi_param SERVER_PROTOCOL    $server_protocol;
    fastcgi_param REMOTE_ADDR        $remote_addr;
    fastcgi_param REMOTE_PORT        $remote_port;
    fastcgi_param SERVER_ADDR        $server_addr;
    fastcgi_param SERVER_PORT        $server_port;
    fastcgi_param SERVER_NAME        $server_name;

Available options:

  • :pattern -> change the pattern nginx matches
  • :cgi_bin_dir -> change the prefix directory of the local cgi-bin
  • :dispatcher -> use a custom dispatcher (socket or tcp based)
  • :custom -> string to be appended within the location block

The method will also accept a block that will be eval'd and the result appended within the location block.


This project exists thanks to all the people who contribute.


Thank you to all our backers!


Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

nginx_simplecgi CHANGELOG

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

0.3.4 - 2022-02-08

  • Remove delivery folder

0.3.3 - 2021-08-31

  • Standardise files with files in sous-chefs/repo-management

0.3.2 - 2021-06-01

  • resolved cookstyle error: libraries/dispatch-helpers.rb:45:7 convention: Style/RedundantCondition

0.3.1 (2020-05-05)

  • resolved cookstyle error: libraries/dispatch-helpers.rb:52:19 warning: Lint/SendWithMixinArgument

0.3.0 (2020-02-01)

  • Change chef_nginx dependency to nginx
  • Require Chef Infra 12.19 or later
  • Change the maintainer to Sous Chefs
  • Update .gitignore and chefignore
  • Add contributing and testing docs
  • Remove the Gemfile
  • Rename .kitchen.yml to kitchen.yml so it's not hidden

0.2.0 (2017-07-18)

  • Support for Bluepill has been removed. If you require Bluepill use the 0.1.X release
  • This cookbook now requires Chef 12.1 or later
  • The nginx dependency has been replaced with chef_nginx which is being actively maintained
  • node.set usage has been replaced with a node.override to avoid setting attributes permanently on the node
  • Fixed the PHP socket being spawned with an incorrect name in Upstart
  • Added the Apache 2.0 license file
  • Support for CentOS 5 has been removed as CentOS 5 is EOL
  • Package installs now use multi-package installation to speed up Chef runs
  • Initial support for Amazon Linux on Chef 13 has been added
  • The cheffile has been removed and replaced with Berkshelf
  • The suggestion to use the yum-epel cookbook has been changed to a hard requirement as 'suggests' in metadata is deprecated
  • A chefignore file has been added to limit the files that are uploaded to the Chef server
  • New metadata fields for issues_url, source_url, and chef_version have been added
  • This changelog has been added to track changes to the cookbook going forward
  • Add symbols in node attributes have been replaced with strings to pass Foodcritic FC001 rule
  • Resolved all cookstyle and foodcritic warnings
  • Test dependencies have been removed from the Gemfile as testing should be done via ChefDK
  • A delivery local mode config file has been added for testing
  • Added testing with Travis CI
  • Added a basic chefspec to test the converge

Collaborator Number Metric

0.3.4 passed this metric

Contributing File Metric

0.3.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Foodcritic Metric

0.3.4 passed this metric

No Binaries Metric

0.3.4 passed this metric

Testing File Metric

0.3.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

0.3.4 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number