module-nginx/README.markdown

48 lines
862 B
Markdown
Raw Normal View History

2011-06-07 01:05:27 +02:00
# NGINX Module
2012-12-14 07:14:25 +01:00
James Fryman <james@frymanet.com>
2011-06-07 01:05:27 +02:00
This module manages NGINX from within Puppet.
# Quick Start
Install and bootstrap an NGINX instance
2011-06-30 19:37:12 +02:00
<pre>
2011-06-07 01:05:27 +02:00
node default {
class { 'nginx': }
}
2011-06-30 19:37:12 +02:00
</pre>
2011-06-07 01:05:27 +02:00
Setup a new virtual host
2011-06-30 19:37:12 +02:00
<pre>
2011-06-07 01:05:27 +02:00
node default {
2012-09-02 09:50:57 +02:00
class { 'nginx': }
2011-06-07 01:05:27 +02:00
nginx::resource::vhost { 'www.puppetlabs.com':
ensure => present,
www_root => '/var/www/www.puppetlabs.com',
}
}
2011-06-30 19:37:12 +02:00
</pre>
2011-06-07 01:05:27 +02:00
Add a Proxy Server(s)
2011-06-30 19:37:12 +02:00
<pre>
2011-06-07 01:05:27 +02:00
node default {
2012-09-02 09:50:57 +02:00
class { 'nginx': }
2012-03-04 18:19:44 +01:00
nginx::resource::upstream { 'puppet_rack_app':
ensure => present,
members => [
2011-06-07 01:05:27 +02:00
'localhost:3000',
'localhost:3001',
'localhost:3002',
],
}
2011-06-07 18:04:04 +02:00
2011-06-07 01:05:27 +02:00
nginx::resource::vhost { 'rack.puppetlabs.com':
ensure => present,
proxy => 'http://puppet_rack_app',
}
}
2011-06-30 19:37:12 +02:00
</pre>