No description
Find a file
James Fryman 96c9305035 Merge pull request #139 from OmarzT/master
make proxy_buffers, proxy_buffer_size, client_max_body_size configurable
2013-09-06 08:19:47 -07:00
manifests added proxy_buffer_size with default value of 8k 2013-09-05 23:15:45 +01:00
spec Merge pull request #131 from apenney/allow-deny 2013-09-04 13:05:58 -07:00
templates added proxy_buffer_size with default value of 8k 2013-09-05 23:15:45 +01: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
.nodeset.yml Add basic rspec-system tests. 2013-09-04 15:11:36 -04: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 basic rspec-system tests. 2013-09-04 15:11:36 -04: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 basic rspec-system tests. 2013-09-04 15:11:36 -04: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