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.3

create nginx site to run your fastcgi application under nginx frontend

Policyfile
Berkshelf
Knife
cookbook 'nginx-fastcgi', '= 0.0.3', :supermarket
cookbook 'nginx-fastcgi', '= 0.0.3'
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.
  • 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.
  • expires: specify expires parameter of HttpHeadersModule, see http://wiki.nginx.org/NginxHttpHeadersModule#expires. Default value is 'max'
  • socket: specify the port or socket on which the FastCGI-server is listening, see http://wiki.nginx.org/HttpFastcgiModule#fastcgi_pass

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
    servers [
        {
            :ip => '127.0.0.1',
            :server_name => 'foo.site.x'
        }
    ]
    socket '/tmp/application.socket'
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
    servers [
        {
            :server_name => 'bar.site.x',
            :ssl => true,
            :ssl_include_path => 'nginx_ssl_settings.conf'

        }
    ]
    socket '/tmp/application.socket'
end

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

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

To install nginx site config with expires parameter:

nginx_fastcgi '/etc/nginx/sites-available/foo.site.conf' do
    servers [
        {
            :server_name => 'foo.site.x',
        }
    ]
    expires '+30d'
    socket '/tmp/application.socket'
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
    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'

        }
    ]
    socket '/tmp/application.socket'
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