From ed0cb0a5f89d611a662fc6a93de407a8a7b7c752 Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Mon, 3 Dec 2012 15:48:09 -0500 Subject: [PATCH] Puppetize nginx.conf Fixes #201. (imported from commit 0feaff372d94009fa51dabf2bda55062826e2ed5) --- servers/puppet/files/nginx/nginx.conf | 31 +++++++++++++++++++++++++++ servers/puppet/manifests/site.pp | 8 +++++++ 2 files changed, 39 insertions(+) create mode 100644 servers/puppet/files/nginx/nginx.conf diff --git a/servers/puppet/files/nginx/nginx.conf b/servers/puppet/files/nginx/nginx.conf new file mode 100644 index 0000000000..2bac93efa4 --- /dev/null +++ b/servers/puppet/files/nginx/nginx.conf @@ -0,0 +1,31 @@ +user humbug; + + +# The rest of the file is the non-commented part of the Debian default config. + +worker_processes 4; +pid /var/run/nginx.pid; + +events { + worker_connections 768; +} + +http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + gzip on; + gzip_disable "msie6"; + + include /etc/nginx/conf.d/*.conf; + include /etc/nginx/sites-enabled/*; +} diff --git a/servers/puppet/manifests/site.pp b/servers/puppet/manifests/site.pp index 24ba21d00c..3bfaa3bf40 100644 --- a/servers/puppet/manifests/site.pp +++ b/servers/puppet/manifests/site.pp @@ -203,6 +203,14 @@ class humbug_apache_base { class humbug_app_frontend { $web_packages = [ "nginx", "memcached", "python-pylibmc", ] package { $web_packages: ensure => "installed" } + file { "/etc/nginx/nginx.conf": + require => Package[nginx], + ensure => file, + owner => "root", + group => "root", + mode => 644, + source => "/root/humbug/servers/puppet/files/nginx/nginx.conf", + } file { "/etc/nginx/sites-available/humbug": require => Package[nginx], ensure => file,