From 27221720f2fdaaad79c06ea41a9d31276f4bfc5a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 17 Feb 2010 20:00:24 -0200 Subject: Adding nginx.conf for puppetmaster proxy --- manifests/init.pp | 9 +++++++++ templates/nginx.conf.erb | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 templates/nginx.conf.erb diff --git a/manifests/init.pp b/manifests/init.pp index 894cb5e..893fdff 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -144,5 +144,14 @@ class nginx::puppetmaster inherits nginx::base { source => 'template', require => File['/etc/nginx/conf.d/puppetmaster.conf'], } + + file { "/etc/nginx/nginx.conf": + content => template("nginx/nginx.conf.erb"), + owner => "root", + group => "root", + mode => 0644, + ensure => present, + notify => Service["nginx"], + } } } diff --git a/templates/nginx.conf.erb b/templates/nginx.conf.erb new file mode 100644 index 0000000..63f32c5 --- /dev/null +++ b/templates/nginx.conf.erb @@ -0,0 +1,28 @@ +user www-data; +worker_processes <%= worker_processes = 4 %>; + +error_log /var/log/nginx/error.log; +pid /var/run/nginx.pid; + +events { + worker_connections <%= worker_connections %>; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + access_log /var/log/nginx/access.log; + + sendfile on; + #tcp_nopush on; + + #keepalive_timeout 0; + keepalive_timeout 65; + tcp_nodelay on; + + gzip on; + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; +} -- cgit v1.2.3