这是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
12 changes: 6 additions & 6 deletions docs/deployment/ssl-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ Your application has access to the HTTP headers `X-Forwarded-Proto`, `X-Forwarde
If your server runs behind an HTTP/S load balancer, then Nginx will see all requests as coming from the load balancer. If your load balancer sets the `X-Forwarded-` headers, you can tell Nginx to pass these headers from load balancer to your application by using the following [nginx custom template](/dokku/nginx/#customizing-the-nginx-configuration)

```shell
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}

server {
listen [::]:{{ .NGINX_PORT }};
listen {{ .NGINX_PORT }};
Expand All @@ -128,12 +134,6 @@ server {
proxy_set_header X-Request-Start $msec;
}
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;

upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
}
```

Expand Down
11 changes: 5 additions & 6 deletions docs/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Dokku uses a templating library by the name of [sigil](https://github.com/glider

### Example Custom Template
```
upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
server {
listen [::]:{{ .NGINX_PORT }};
listen {{ .NGINX_PORT }};
Expand All @@ -42,12 +47,6 @@ server {
proxy_set_header X-Request-Start $msec;
}
include {{ .DOKKU_ROOT }}/{{ .APP }}/nginx.conf.d/*.conf;

upstream {{ .APP }} {
{{ range .DOKKU_APP_LISTENERS | split " " }}
server {{ . }};
{{ end }}
}
}
```

Expand Down