Initial Chef repository
This commit is contained in:
32
site-cookbooks/kosmos-nginx/recipes/default.rb
Normal file
32
site-cookbooks/kosmos-nginx/recipes/default.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# Cookbook Name:: kosmos-nginx
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2015, Kosmos
|
||||
#
|
||||
# All rights reserved - Do Not Redistribute
|
||||
#
|
||||
node.override['nginx']['default_site_enabled'] = false
|
||||
node.override['nginx']['server_tokens'] = 'off'
|
||||
node.override['nginx']['log_formats']['json'] = <<-EOF
|
||||
'{"ip":"$remote_addr",'
|
||||
'"time":"$time_local",'
|
||||
'"host":"$host",'
|
||||
'"method":"$request_method",'
|
||||
'"uri":"$uri",'
|
||||
'"status":$status,'
|
||||
'"size":$body_bytes_sent,'
|
||||
'"referer":"$http_referer",'
|
||||
'"upstream_addr":"$upstream_addr",'
|
||||
'"upstream_response_time":"$upstream_response_time",'
|
||||
'"ua":"$http_user_agent"}'
|
||||
EOF
|
||||
|
||||
|
||||
include_recipe 'nginx'
|
||||
|
||||
firewall_rule 'http/https' do
|
||||
port [80, 443]
|
||||
protocol :tcp
|
||||
action :allow
|
||||
end
|
||||
Reference in New Issue
Block a user