From 57647177bf1922b0c54cd40cb08b58f63ee59367 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 27 Oct 2019 14:46:02 +0800 Subject: [PATCH 1/3] Enable `stream` module. --- cookbooks/nginx/files/home/webadm/nginx-build/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/nginx/files/home/webadm/nginx-build/configure.sh b/cookbooks/nginx/files/home/webadm/nginx-build/configure.sh index 1564fd0..6930690 100644 --- a/cookbooks/nginx/files/home/webadm/nginx-build/configure.sh +++ b/cookbooks/nginx/files/home/webadm/nginx-build/configure.sh @@ -8,4 +8,4 @@ --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module \ --with-http_v2_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module \ --with-http_addition_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module \ - --with-http_sub_module + --with-http_sub_module --with-stream --with-stream_ssl_module From a434ddaee2e138f75477a6243b02d3585a84098d Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 27 Oct 2019 14:47:23 +0800 Subject: [PATCH 2/3] Load the `Nginx` config from `stream-enable/` directory. --- cookbooks/nginx/files/etc/nginx/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbooks/nginx/files/etc/nginx/nginx.conf b/cookbooks/nginx/files/etc/nginx/nginx.conf index 23ee686..49a5838 100644 --- a/cookbooks/nginx/files/etc/nginx/nginx.conf +++ b/cookbooks/nginx/files/etc/nginx/nginx.conf @@ -87,3 +87,7 @@ http { include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } + +stream { + include /etc/nginx/stream-enabled/*; +} From be73c1f6a5c002eb9611fa9c8e6fe6bca5a73f41 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 27 Oct 2019 14:48:30 +0800 Subject: [PATCH 3/3] Create the config directory for stream config. --- cookbooks/nginx/setup.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cookbooks/nginx/setup.rb b/cookbooks/nginx/setup.rb index e014a42..1a29ef8 100644 --- a/cookbooks/nginx/setup.rb +++ b/cookbooks/nginx/setup.rb @@ -7,7 +7,7 @@ end end -%w( sites-available sites-enabled ).each do |d| +%w( sites-available sites-enabled stream-available stream-enabled).each do |d| directory "/etc/nginx/#{d}" do owner 'root' group 'root' @@ -20,7 +20,7 @@ remote_file '/etc/nginx/nginx.conf' do owner 'root' group 'root' mode '644' - + notifies :reload, 'service[nginx]' end