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

RSS

nginx-fastcgi (9) Versions 0.0.5

create nginx site to run your fastcgi application under nginx frontend

Policyfile
Berkshelf
Knife
cookbook 'nginx-fastcgi', '= 0.0.5', :supermarket
cookbook 'nginx-fastcgi', '= 0.0.5'
knife supermarket install nginx-fastcgi
knife supermarket download nginx-fastcgi
README
Dependencies
Quality -%

Description

Create nginx site to run your fastcgi application under nginx front-end

Requirements

Should work on any platform where nginx is installed. Tested on Ubuntu.

Limitations

fastcgi standalone server mode is only supported

DEFINITIONS

nginx_fastcgi

This definition can be used to create nginx site to run your fastcgi application under nginx front-end.

The definition takes the following params:

  • name: specifies a single path (string) where nginx site config will be installed. No default, this must be specified.
  • socket: specifies the port or socket on which the FastCGI-server is listening, see http://wiki.nginx.org/HttpFastcgiModule#fastcgi_pass. No default, this must be specified.
  • static: specifies location of static files (not handled by application, but nginx)
  • servers: specifies all virtual hosts to be included into site config
  • cookbook: select the template source from the specified cookbook. By default it will use the cookbook where the definition is used.
  • fastcgi_param: specifies additional fastcgi_params to be included into location block

See USAGE below.

Usage

To install nginx site config for http virtual host 127.0.0.1:80 with hostname foo.site.x:

nginx_fastcgi '/etc/nginx/sites-available/foo.site.conf' do
    socket '/tmp/application.socket'
    servers [
        {
            :ip => '127.0.0.1',
            :server_name => 'foo.site.x'
        }
    ]
end

To install nginx site config for https virtual host with hostname bar.site.x:

nginx_fastcgi '/etc/nginx/sites-available/foo.site.conf' do
    socket '/tmp/application.socket'
    servers [
        {
            :server_name => 'bar.site.x',
            :ssl => true,
            :ssl_include_path => 'nginx_ssl_settings.conf'

        }
    ]
end

To install nginx site config with static files handle by nginx:

nginx_fastcgi '/etc/nginx/sites-available/foo.site.conf' do
    root  '/var/www/MyApp/root'
    socket '/tmp/application.socket'
    servers [
        {
            :server_name => 'foo.site.x',
        }
    ]
end

To install nginx site config for http/https virtual hosts with hostname bar.site.x, with all http traffic get redirected to https host:

nginx_fastcgi '/etc/nginx/sites-available/foo.site.conf' do
    socket '/tmp/application.socket'
    servers [
        {
            :ip => '127.0.0.1',
            :server_name => 'bar.site.x',
            :redirect => 'https'                
        },
        {
            :ip => '127.0.0.1',
            :server_name => 'bar.site.x',
            :ssl => true,
            :ssl_include_path => 'nginx_ssl_settings.conf'
        }
    ]
end

To install nginx site config with static files handle by nginx:

nginx_fastcgi '/etc/nginx/sites-available/foo.site.conf' do
    socket '/tmp/application.socket'
    static(
            :location => 'static/',
            :root => '/var/www/MyApp/root'
    )
    servers [
        {
            :server_name => 'foo.site.x',
        }
    ]
end

To install nginx site config with additional fastcgi_params:

nginx_fastcgi '/etc/nginx/sites-available/foo.site.conf' do
    socket '/tmp/application.socket'
    fastcgi_param  [
        { :name => 'SCRIPT_NAME', :value => "\"\"" },
        { :name => 'PATH_INFO' , :value => '$uri' }
    ]
    servers [
        {
            :server_name => 'foo.site.x',
        }
    ]
end

Features

For complete examples of usage see cucumber features in features/ dir

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found