这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
### Additional information

- Container Inspect Output (if applicable) via `dokku ps:inspect APP_NAME`
- `cat /home/dokku/<app>/nginx.conf` (if applicable):
- The nginx configuration (if applicable) via `dokku nginx:show-conf`
- Link to the exact repository being deployed (if possible/applicable):
- If a deploy is failing or behaving unexpectedly:
- Application name
Expand Down
9 changes: 9 additions & 0 deletions docs/configuration/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Dokku uses nginx as its server for routing requests to specific applications. By
nginx:access-logs <app> [-t] # Show the nginx access logs for an application (-t follows)
nginx:build-config <app> # (Re)builds nginx config for given app
nginx:error-logs <app> [-t] # Show the nginx error logs for an application (-t follows)
nginx:show-conf <app> # Display app nginx config
nginx:validate [<app>] [--clean] # Validates and optionally cleans up invalid nginx configurations
```

Expand Down Expand Up @@ -45,6 +46,14 @@ In certain cases, your app nginx configs may drift from the correct config for y
dokku nginx:build-config node-js-app
```

## Showing the nginx config

For debugging purposes, it may be useful to show the nginx config. This can be achieved via the `nginx:show-conf` command.

```shell
dokku nginx:show-conf node-js-app
```

## Validating nginx configs

It may be desired to validate an nginx config outside of the deployment process. To do so, run the `nginx:validate` command. With no arguments, this will validate all app nginx configs, one at a time. A minimal wrapper nginx config is generated for each app's nginx config, upon which `nginx -t` will be run.
Expand Down
3 changes: 2 additions & 1 deletion plugins/nginx-vhosts/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ nginx_vhosts_conf_clean_func() {
nginx_vhosts_help_content_func() {
declare desc="return nginx plugin help content"
cat <<help_content
nginx:build-config <app>, (Re)builds nginx config for given app
nginx:access-logs <app> [-t], Show the nginx access logs for an application (-t follows)
nginx:build-config <app>, (Re)builds nginx config for given app
nginx:error-logs <app> [-t], Show the nginx error logs for an application (-t follows)
nginx:show-conf <app>, Display app nginx config
nginx:validate [<app>] [--clean], Validates and optionally cleans up invalid nginx configurations
help_content
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/nginx-vhosts/subcommands/show-conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"

nginx_show_conf_cmd() {
declare desc="display app nginx conf"
declare desc="display app nginx config"
declare cmd="nginx:show-conf" argv=("$@")
[[ ${argv[0]} == "$cmd" ]] && shift 1
declare APP="$1"
Expand Down