From 3e650f5c483347a1302d7cf1bbc55e9f8f37242c Mon Sep 17 00:00:00 2001 From: Alexander Kozlov Date: Thu, 17 Dec 2015 02:40:48 +0300 Subject: [PATCH 1/2] Added ability to configure KeepAlive option Sometimes it's necessary optimization in nginx+apache2 environment --- apache/files/Debian/apache-2.4.config.jinja | 2 +- pillar.example | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apache/files/Debian/apache-2.4.config.jinja b/apache/files/Debian/apache-2.4.config.jinja index c2967d7..854fc2d 100644 --- a/apache/files/Debian/apache-2.4.config.jinja +++ b/apache/files/Debian/apache-2.4.config.jinja @@ -91,7 +91,7 @@ Timeout 300 # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # -KeepAlive On +KeepAlive {{ salt['pillar.get']('apache:keepalive', 'On') }} # # MaxKeepAliveRequests: The maximum number of requests to allow diff --git a/pillar.example b/pillar.example index f657103..9309aaf 100644 --- a/pillar.example +++ b/pillar.example @@ -116,6 +116,10 @@ apache: disabled: # List modules to disable - rewrite + # KeepAlive: Whether or not to allow persistent connections (more than + # one request per connection). Set to "Off" to deactivate. + keepalive: On + security: # can be Full | OS | Minimal | Minor | Major | Prod # where Full conveys the most information, and Prod the least. From 57d11a1cf00652c7b5609a135c2b041880c8e4bf Mon Sep 17 00:00:00 2001 From: Alexander Kozlov Date: Thu, 17 Dec 2015 02:50:37 +0300 Subject: [PATCH 2/2] Fixed YAML parsing On/Off as True/False True and False are not correct values for apache config --- pillar.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar.example b/pillar.example index 9309aaf..03e129e 100644 --- a/pillar.example +++ b/pillar.example @@ -118,7 +118,7 @@ apache: # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. - keepalive: On + keepalive: 'On' security: # can be Full | OS | Minimal | Minor | Major | Prod