nb proxy nginx

nb proxy nginx is the command-group entry for the Nginx provider.

If you already use Nginx to manage sites, certificates, caching, or access control, this is usually the place to start. It handles two things:

  • choosing how Nginx runs, which means local or docker
  • generating, starting, reloading, and inspecting the Nginx entrypoint for CLI-managed envs

Usage

nb proxy nginx <command>

Subcommands

CommandDescription
nb proxy nginx useSwitch the Nginx driver
nb proxy nginx currentPrint the current driver
nb proxy nginx generateGenerate or refresh the Nginx config for one env
nb proxy nginx startStart the Nginx proxy
nb proxy nginx restartRestart the Nginx proxy
nb proxy nginx reloadReload the Nginx config
nb proxy nginx stopStop the Nginx proxy
nb proxy nginx statusShow Nginx runtime status
nb proxy nginx infoShow driver, config paths, and runtime info

Notes

  • The current driver is stored in proxy.nginx-driver
  • The default driver is local
  • The local driver uses the executable pointed to by bin.nginx, whose default value is nginx
  • The Docker driver uses nginx:latest
  • The default Docker container name is <docker.container-prefix>-nginx-proxy
  • The Docker driver mounts host NB_CLI_ROOT into the container at /apps

Typical workflow

nb proxy nginx use docker
nb proxy nginx generate --env app1 --host app1.example.com
nb proxy nginx start
nb proxy nginx status
nb proxy nginx info