From 000c96a9b6ac1892e32e38c6da0c45b876bff6ac Mon Sep 17 00:00:00 2001 From: Garrett W Date: Wed, 10 Apr 2019 13:07:03 -0500 Subject: [PATCH 1/9] pillar.example: an include was missing a colon --- pillar.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index 1015955a..02f20115 100644 --- a/pillar.example +++ b/pillar.example @@ -118,7 +118,7 @@ nginx: # see also http://nginx.org/en/docs/example.html #-- - - - - -- - - -- - - - - -- - - -- - - - -- - - - - - -- - - - - - -- - - - - -- - - - - -- - - # config: - include 'snippets/letsencrypt.conf' + include: 'snippets/letsencrypt.conf' source_path: salt://path_to_nginx_conf_file/nginx.conf # IMPORTANT: This option is mutually exclusive with the rest of the # options; if it is found other options (worker_processes: 4 and so # on) are not processed and just upload the file from source From 3b90619fce82725a0962de760768dc2c579fe461 Mon Sep 17 00:00:00 2001 From: Garrett W Date: Wed, 10 Apr 2019 13:07:31 -0500 Subject: [PATCH 2/9] pillar.example: 2 directives not indented properly --- pillar.example | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pillar.example b/pillar.example index 02f20115..be549d66 100644 --- a/pillar.example +++ b/pillar.example @@ -133,11 +133,11 @@ nginx: #### Note: Syntax issues in these files generate nginx [emerg] errors on startup. #### - /etc/nginx/mime.types - ### module ngx_http_log_module example - log_format: |- - main '...'; - access_log /var/log/nginx/access_log main - access_log: [] #suppress default access_log option from being added + ### module ngx_http_log_module example + log_format: |- + main '...'; + access_log /var/log/nginx/access_log main + access_log: [] #suppress default access_log option from being added ### module nngx_stream_core_module ### https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/#example From ba04fc9be576af6ea151b157a801bb36250606fe Mon Sep 17 00:00:00 2001 From: Garrett W Date: Wed, 10 Apr 2019 13:24:56 -0500 Subject: [PATCH 3/9] pillar.example: added the stock log_format --- pillar.example | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pillar.example b/pillar.example index be549d66..43fa2cf9 100644 --- a/pillar.example +++ b/pillar.example @@ -135,8 +135,10 @@ nginx: ### module ngx_http_log_module example log_format: |- - main '...'; - access_log /var/log/nginx/access_log main + main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + access_log /var/log/nginx/access_log main; access_log: [] #suppress default access_log option from being added ### module nngx_stream_core_module From 44f9b449045fbdd62e1be0a608fdbeecb18a9ae3 Mon Sep 17 00:00:00 2001 From: Garrett W Date: Wed, 10 Apr 2019 13:54:29 -0500 Subject: [PATCH 4/9] pillar.example: make log path match map.jinja --- pillar.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index 43fa2cf9..b5facfac 100644 --- a/pillar.example +++ b/pillar.example @@ -138,7 +138,7 @@ nginx: main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; - access_log /var/log/nginx/access_log main; + access_log /var/log/nginx/access.log main; access_log: [] #suppress default access_log option from being added ### module nngx_stream_core_module From 646335cb79e73a6ccd4f6f7faa2961399de5006c Mon Sep 17 00:00:00 2001 From: Garrett W Date: Wed, 10 Apr 2019 14:43:30 -0500 Subject: [PATCH 5/9] pillar.example: worker_connections value from latest mainline nginx --- pillar.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index b5facfac..c4161b6b 100644 --- a/pillar.example +++ b/pillar.example @@ -126,7 +126,7 @@ nginx: load_module: modules/ngx_http_lua_module.so # pass as very first in configuration; otherwise nginx will fail to start #pid: /var/run/nginx.pid # Directory location must exist (i.e. it's /run/nginx.pid on EL7) events: - worker_connections: 768 + worker_connections: 1024 http: sendfile: 'on' include: From 3f604f6edbb47385ee35cc78793a16f958fee85a Mon Sep 17 00:00:00 2001 From: Garrett W Date: Wed, 10 Apr 2019 15:10:27 -0500 Subject: [PATCH 6/9] pillar.example: fixed other uses of include --- pillar.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pillar.example b/pillar.example index c4161b6b..a85d9fd7 100644 --- a/pillar.example +++ b/pillar.example @@ -210,7 +210,7 @@ nginx: - location ~ .htm: - try_files: '$uri $uri/ =404' - test: something else - - include 'snippets/letsencrypt.conf' + - include: 'snippets/letsencrypt.conf' # Or a slightly more compact alternative syntax: @@ -223,7 +223,7 @@ nginx: - location ~ .htm: - try_files: '$uri $uri/ =404' - test: something else - - include 'snippets/letsencrypt.conf' + - include: 'snippets/letsencrypt.conf' # both of those output: # server { From f276a601ac5c314f49757bdf5ea8ea79067c77f8 Mon Sep 17 00:00:00 2001 From: Garrett W Date: Thu, 11 Apr 2019 08:56:51 -0500 Subject: [PATCH 7/9] pillar.example: corrected formatting --- pillar.example | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pillar.example b/pillar.example index a85d9fd7..2e8c0aa2 100644 --- a/pillar.example +++ b/pillar.example @@ -136,9 +136,9 @@ nginx: ### module ngx_http_log_module example log_format: |- main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - access_log /var/log/nginx/access.log main; + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + access_log /var/log/nginx/access.log main access_log: [] #suppress default access_log option from being added ### module nngx_stream_core_module From ed71555074a1277bd8fabe4c7ce2b619a1e1b325 Mon Sep 17 00:00:00 2001 From: Garrett W Date: Thu, 11 Apr 2019 11:17:23 -0500 Subject: [PATCH 8/9] pillar.example: corrected log_format --- pillar.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pillar.example b/pillar.example index 2e8c0aa2..d0e4f05e 100644 --- a/pillar.example +++ b/pillar.example @@ -135,8 +135,8 @@ nginx: ### module ngx_http_log_module example log_format: |- - main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' + main '$remote_addr - $remote_user [$time_local] $status ' + '"$request" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main access_log: [] #suppress default access_log option from being added From 8d7d1acae9702acd4ab54c81d325511556c54e7c Mon Sep 17 00:00:00 2001 From: Garrett W Date: Thu, 11 Apr 2019 11:32:11 -0500 Subject: [PATCH 9/9] pillar.example: reset log_format to try another day --- pillar.example | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pillar.example b/pillar.example index d0e4f05e..37a3302d 100644 --- a/pillar.example +++ b/pillar.example @@ -135,10 +135,8 @@ nginx: ### module ngx_http_log_module example log_format: |- - main '$remote_addr - $remote_user [$time_local] $status ' - '"$request" $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - access_log /var/log/nginx/access.log main + main '...'; + access_log /var/log/nginx/access_log main access_log: [] #suppress default access_log option from being added ### module nngx_stream_core_module