xin

Command line

The interface is nginx's, deliberately — -t, -s reload and -c behave the way your scripts, unit files and muscle memory already expect.

Usage: xind [-?hvVtTq] [-s signal] [-p prefix]
            [-e filename] [-c filename] [-g directives]
            [filename]

Options

FlagWhat it does
-?, -h Print the usage summary and exit.
-v Print the version and exit.
-V Print the version plus build information — target triple, and which TLS provider was compiled in.
-t Test the configuration and exit. Reads the file in place and writes nothing.
-T Test the configuration, dump it, and exit.
-q Suppress non-error messages during configuration testing.
-s <signal> Signal a running master process: stop, quit, reopen, reload.
-p <prefix> Set the prefix path. Default /usr/share/nginx/.
-e <file> Set the error log file. Default stderr.
-c <file> Set the configuration file. Default /etc/nginx/nginx.conf.
-g <directives> Set global directives outside the configuration file.
<filename> The configuration file as a bare positional argument. A xin extension — nginx has no equivalent.

The ones you will actually use

Check a config without running it

xind -t -c /etc/nginx/nginx.conf

Reads in place, converts nothing, reports every problem rather than stopping at the first. Exit status is zero only if the whole file is understood.

See what was actually built from it

xind -T -c /etc/nginx/nginx.conf

Dumps the configuration as xin resolved it — useful when include globs and inheritance make the effective config different from what any single file looks like.

Confirm what a binary is

$ xind -V
xin version: xin/0.1.1
built with rustc (target x86_64-unknown-linux-musl)
TLS: rustls with aws-lc-rs (not the FIPS module)

The TLS line is worth reading before an audit: the standard builds use aws-lc-rs, which is not the FIPS-validated module.

Signals

xind -s reload    # re-read config
xind -s reopen    # reopen log files, after logrotate
xind -s quit      # graceful shutdown
xind -s stop      # immediate shutdown

A reload is not yet loss-free. Under sustained load it drops on the order of 2 requests in 140,000 through our harness, where nginx drops none. For a zero-loss change, drain the host at your load balancer first.

Configuration file resolution

With no -c and no positional argument, xin reads /etc/nginx/nginx.conf — the file a host running nginx already has, so a trial needs no new file and a rollback needs no diffing. The bare positional form (xind /path/to/conf) is a xin extension; nginx has no equivalent, so prefer -c in anything portable.