No description
Find a file
Ashley Penney 8ddc6f6ccf This commit allows you to set package_ensure in nginx and have that
trickle through to the package classes.  I've avoided making them
into paramaterized classes and we just refer directly back to the main
nginx namespace to get the variable.  Makes for a cleaner looking
module!
2013-09-04 13:29:30 -04:00
manifests This commit allows you to set package_ensure in nginx and have that 2013-09-04 13:29:30 -04:00
spec This commit allows you to set package_ensure in nginx and have that 2013-09-04 13:29:30 -04:00
templates Merge pull request #123 from jhoblitt/sort_vhost_cfg_append 2013-09-03 08:08:20 -07:00
tests linting 2013-05-08 14:15:42 +02:00
.fixtures.yml Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
.gitignore Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
ChangeLog Rebase bashtoni's pull request from a year ago: 2012-12-05 23:11:29 -08:00
composer.json added original license to composer.json 2013-05-18 15:37:27 +02:00
Gemfile Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
Gemfile.lock Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
LICENSE 20110524 Work Snapshot 2011-05-24 21:20:48 -05:00
Modulefile bumping to v0.0.5, fixing array bug 2013-08-25 18:17:52 -05:00
Puppetfile Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
Puppetfile.lock Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
Rakefile Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
README.markdown Update README to use syntax highlighting 2013-08-25 22:21:53 -07:00

NGINX Module

James Fryman james@frymanet.com

This module manages NGINX configuration.

Quick Start

Install and bootstrap an NGINX instance

class { 'nginx': }

Setup a new virtual host

nginx::resource::vhost { 'www.puppetlabs.com':
  ensure   => present,
  www_root => '/var/www/www.puppetlabs.com',
}

Add a Proxy Server

nginx::resource::upstream { 'puppet_rack_app':
 ensure  => present,
 members => [
   'localhost:3000',
   'localhost:3001',
   'localhost:3002',
 ],
}

nginx::resource::vhost { 'rack.puppetlabs.com':
  ensure => present,
  proxy  => 'http://puppet_rack_app',
}

Add a smtp proxy


class { 'nginx':
 mail => true,
}

nginx::resource::mailhost { 'domain1.example':
 ensure      => present,
 auth_http   => 'server2.example/cgi-bin/auth',
 protocol    => 'smtp',
 listen_port => 587,
 ssl_port    => 465,
 starttls    => 'only',
 xclient     => 'off',
 ssl         => 'true',
 ssl_cert    => '/tmp/server.crt',
 ssl_key     => '/tmp/server.pem',
}

Hiera Support

Defining nginx resources in Hiera.

nginx::nginx_upstreams:
  'puppet_rack_app':
    ensure: present
    members:
      - localhost:3000
      - localhost:3001
      - localhost:3002
nginx::nginx_vhosts:
  'www.puppetlabs.com':
    www_root: '/var/www/www.puppetlabs.com'
  'rack.puppetlabs.com':
    ensure: present
    proxy: 'http://puppet_rack_app'
nginx::nginx_locations:
  'static':
    location: '~ "^/static/[0-9a-fA-F]{8}\/(.*)$"'
    vhost: www.puppetlabs.com
  'userContent':
    location: /userContent
    vhost: www.puppetlabs.com
    www_root: /var/www/html