]> gitweb.fluxo.info Git - puppet-nginx.git/commitdiff
Adding nginx.conf for puppetmaster proxy
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 17 Feb 2010 22:00:24 +0000 (20:00 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 17 Feb 2010 22:00:24 +0000 (20:00 -0200)
manifests/init.pp
templates/nginx.conf.erb [new file with mode: 0644]

index 894cb5eb8eb3c8fcfd5e0ee012f23daa4dd517ee..893fdff242ee8737fb04c825827ec238261fa50c 100644 (file)
@@ -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 (file)
index 0000000..63f32c5
--- /dev/null
@@ -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/*;
+}