Opened 19 months ago

Last modified 4 months ago

#1506 new enhancement

bind() in configuration test is too cautious

Reported by: tailhook@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.13.x
Keywords: Cc:
uname -a: Linux hostname 4.4.0-109-generic #132~14.04.1-Ubuntu SMP Tue Jan 9 21:46:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.12.2

Description

Currently, nginx does too much when testing configuration (nginx -t). While in some cases it's good idea to test everything that's possible to test, there are a lot of use cases where it's not:

  1. I want to test configuration file syntax on different machine
  2. I want to run nginx -t as a non-root user
  3. I don't want nginx -t to clobber socket when it may run simultaneously with starting nginx daemon by other subsystem (chance is quite low, still not sure why it's needed)

So it would be nice if there was a flag that does configuration file syntax check but doesn't rely on running in the same system: don't bind sockets, don't try to open logs and pid files, and maybe other things that I don't know yet.

(tested on 1.12.2, sorry if it's fixed in master)

What do you think?

Change History (2)

comment:1 Changed 6 months ago by mdounin

See also #1764.

comment:2 Changed 4 months ago by mdounin

See also #1791.

Note: See TracTickets for help on using tickets.