From e13ef95f7000c3c8323f9b105b4b8be7c248c164 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 30 Jan 2017 15:45:50 +0200 Subject: [PATCH] roles/nginx: Update nginx.conf.j2 This is to accomodate Debian's 9 nginx package, as it provides a different system user/group than nginx.org's packages. --- roles/nginx/templates/nginx.conf.j2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/roles/nginx/templates/nginx.conf.j2 b/roles/nginx/templates/nginx.conf.j2 index 0f3acd7..f9d5b33 100644 --- a/roles/nginx/templates/nginx.conf.j2 +++ b/roles/nginx/templates/nginx.conf.j2 @@ -1,6 +1,10 @@ # Run as a unique, less privileged user for security reasons. -user nginx; +{% if ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '==') %} +user www-data; +{% else %} +user nginx; +{% endif %} # Sets the worker threads to the number of CPU cores available in the system for best performance. # Should be > the number of CPU cores.