CLI options

nginx -p and -c path selection

Selects path prefix and configuration file. Does not sandbox absolute paths. Example is a lab test; prepare directories first.

Formal Syntax & Structure

nginx syntaxnginx
nginx -p prefix -c file

Parameters & Attributes

NameTypeDescription
prefixpathPrefix directory
filepathConfiguration file

Working Example

Example Snippetnginx
nginx -e stderr -p "$LAB/" -c "$LAB/nginx.conf" -t
Nginx Reference