Skip to content

Commit

Permalink
Merge pull request #2311 from depay/set_nobody_nobody_as_default
Browse files Browse the repository at this point in the history
fix(conf) set `nobody nobody` as default nginx user
  • Loading branch information
thibaultcha authored Mar 31, 2017
2 parents df49932 + 043f14f commit b12c971
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kong.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# HTTPS requests to the admin API, if
# `admin_ssl` is enabled.

#nginx_user = nobody # Defines user and group credentials used by
#nginx_user = nobody nobody # Defines user and group credentials used by
# worker processes. If group is omitted, a
# group whose name equals that of user is
# used. Ex: [user] [group].
Expand Down
2 changes: 1 addition & 1 deletion kong/templates/kong_defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ proxy_listen = 0.0.0.0:8000
proxy_listen_ssl = 0.0.0.0:8443
admin_listen = 0.0.0.0:8001
admin_listen_ssl = 0.0.0.0:8444
nginx_user = nobody
nginx_user = nobody nobody
nginx_worker_processes = auto
nginx_optimizations = on
nginx_daemon = on
Expand Down
6 changes: 3 additions & 3 deletions spec/01-unit/02-conf_loader_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe("Configuration loader", function()
it("loads the defaults", function()
local conf = assert(conf_loader())
assert.is_string(conf.lua_package_path)
assert.equal("nobody", conf.nginx_user)
assert.equal("nobody nobody", conf.nginx_user)
assert.equal("auto", conf.nginx_worker_processes)
assert.equal("0.0.0.0:8001", conf.admin_listen)
assert.equal("0.0.0.0:8000", conf.proxy_listen)
Expand All @@ -22,7 +22,7 @@ describe("Configuration loader", function()
-- defaults
assert.equal("on", conf.nginx_daemon)
-- overrides
assert.equal("nobody", conf.nginx_user)
assert.equal("nobody nobody", conf.nginx_user)
assert.equal("1", conf.nginx_worker_processes)
assert.equal("0.0.0.0:9001", conf.admin_listen)
assert.equal("0.0.0.0:9000", conf.proxy_listen)
Expand All @@ -41,7 +41,7 @@ describe("Configuration loader", function()
-- defaults
assert.equal("on", conf.nginx_daemon)
-- overrides
assert.equal("nobody", conf.nginx_user)
assert.equal("nobody nobody", conf.nginx_user)
assert.equal("auto", conf.nginx_worker_processes)
assert.equal("127.0.0.1:9001", conf.admin_listen)
assert.equal("0.0.0.0:9000", conf.proxy_listen)
Expand Down
2 changes: 1 addition & 1 deletion spec/01-unit/03-prefix_handler_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe("NGINX conf compiler", function()
describe("compile_nginx_conf()", function()
it("compiles a main NGINX conf", function()
local nginx_conf = prefix_handler.compile_nginx_conf(helpers.test_conf)
assert.matches("user nobody;", nginx_conf, nil, true)
assert.matches("user nobody nobody;", nginx_conf, nil, true)
assert.matches("worker_processes 1;", nginx_conf, nil, true)
assert.matches("daemon on;", nginx_conf, nil, true)
end)
Expand Down

0 comments on commit b12c971

Please sign in to comment.