Expand description
rws --check: validate rws.config.toml without starting the server —
the counterpart of nginx -t / caddy validate.
Reports unknown keys (in settings and in proxy sections), values of the wrong type, TLS files that can’t be loaded, proxy routes pointing at undeclared upstreams, auth secrets that aren’t set, and similar mistakes that would otherwise surface as a warning in the startup log or as a 503 at request time. Nothing is bound and the environment is not modified.
rws --check # the file rws would load (RWS_CONFIG_FILE or ./rws.config.toml)
rws --check=/etc/rws/site.toml # a specific fileStructs§
- Config
Report - Errors and warnings found in a configuration file.
Functions§
- check_
file - Check the configuration file at
path. - check_
str - Check configuration text. Relative file paths in it (certificates, htpasswd files, static roots) are resolved against the working directory, as the server resolves them.
- check_
target_ from_ args - The path
--checktargets inargs(the process arguments), orNonewhen--checkis absent.--check=<path>and--check <path>name a file; a bare--checkchecks the file the server would load. - default_
config_ path RWS_CONFIG_FILEif set, elserws.config.tomlin the working directory.- wants_
json_ output - Whether the arguments ask for machine-readable output (
--format=json).