docs/docs/en/api/cli/proxy/nginx/generate.md
Generate or refresh the Nginx entry config for one CLI-managed env.
nb proxy nginx generate --env <name> [--host <domain>] [--port <port>]
| Parameter | Type | Description |
|---|---|---|
--env, -e | string | CLI-managed env name to generate the config for |
--host | string | Host written into the entry config, such as app1.example.com |
--port | string | Listen port written into the entry config, such as 8080 |
Using env test2 as an example, the command typically maintains these files and directories:
NB_CLI_ROOT/.nocobase/proxy/nginx/nocobase.confNB_CLI_ROOT/.nocobase/proxy/nginx/snippets/NB_CLI_ROOT/.nocobase/proxy/nginx/test2/app.confNB_CLI_ROOT/.nocobase/proxy/nginx/test2/public/index-v1.htmlNB_CLI_ROOT/.nocobase/proxy/nginx/test2/public/index-v2.htmlThe generated Nginx entry covers these main capability areas:
uploadsdistwell-knownapiwsspanb proxy nginx generate --env demo --host demo.local.nocobase.com
nb proxy nginx generate --env demo --host demo.local.nocobase.com --port 8080
generate only writes or refreshes config and does not automatically start Nginxapp.conf is the editable entry file, but its managed block must stay intactapp-port or app-public-path with nb env update, you will usually need to rerun this commandlocal or docker envs can use this command