2017-02-12 15:42:59 -05:00
|
|
|
#
|
|
|
|
# Cookbook Name:: zabbix
|
|
|
|
# Recipe:: server_nginx
|
|
|
|
#
|
|
|
|
# Copyright 2017, Linux-Help.org
|
|
|
|
# Authors:
|
|
|
|
# Eric Renfro <psi-jack@linux-help.org>
|
|
|
|
#
|
|
|
|
|
|
|
|
#########################
|
|
|
|
# Setup and Install nginx
|
|
|
|
include_recipe 'chef_nginx'
|
|
|
|
|
|
|
|
nginx_site "zabbix" do
|
|
|
|
tname = node['zabbix']['php']['use_fpm'] ? "zabbix-fpm" : "zabbix-fcgi"
|
|
|
|
template %W{
|
|
|
|
nginx/#{node['platform']}/#{node['platform_version'].to_i}/#{tname}.conf.erb
|
|
|
|
nginx/#{node['platform']}/#{tname}.conf.erb
|
|
|
|
nginx/#{node['platform_family']}/#{node['platform_version'].to_i}/#{tname}.conf.erb
|
|
|
|
nginx/#{node['platform_family']}/#{tname}.conf.erb
|
|
|
|
nginx/default/#{tname}.conf.erb
|
|
|
|
nginx/#{tname}.conf.erb
|
|
|
|
}
|
2017-02-12 15:46:48 -05:00
|
|
|
variables({
|
|
|
|
:params => {
|
|
|
|
:server_port => node['nginx']['port'],
|
|
|
|
:server_name => "#{node['fqdn']}, zabbix.#{node['domain']}",
|
|
|
|
:docroot => '/usr/share/zabbix',
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
2017-02-12 15:42:59 -05:00
|
|
|
end
|