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.