Use nginx's official repo and improve TLS configuration
These packagea are newer than the 15.04 we had. We can enable HTTP2
This commit is contained in:
@@ -22,9 +22,26 @@ node.override['nginx']['log_formats']['json'] = <<-EOF
|
||||
'"ua":"$http_user_agent"}'
|
||||
EOF
|
||||
|
||||
|
||||
node.override['nginx']['repo_source'] = 'nginx' # Install from official repo
|
||||
node.override['nginx']['upstream_repository'] = "http://nginx.org/packages/mainline/#{node['platform']}"
|
||||
include_recipe 'nginx'
|
||||
|
||||
# Generate Strong Diffie-Hellman Group (increases security)
|
||||
# https://weakdh.org/sysadmin.html
|
||||
openssl_dhparam "/etc/ssl/private/dhparams.pem" do
|
||||
key_length 2048
|
||||
mode 0600
|
||||
owner 'www-data'
|
||||
end
|
||||
|
||||
cookbook_file "#{node['nginx']['dir']}/conf.d/tls_config.conf" do
|
||||
source 'nginx_tls_config.conf'
|
||||
owner 'root'
|
||||
group 'root'
|
||||
mode '0644'
|
||||
notifies :restart, 'service[nginx]'
|
||||
end
|
||||
|
||||
unless node.chef_environment == "development"
|
||||
include_recipe 'kosmos-base::firewall'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user