From f0e87d222619615c030b2ee90d2220d4d2d9b7f1 Mon Sep 17 00:00:00 2001 From: Kurtis Jensen Date: Mon, 2 Jan 2023 03:49:29 +0000 Subject: [PATCH 1/3] adds note about default nginx site --- docs/networking/proxies/nginx.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/networking/proxies/nginx.md b/docs/networking/proxies/nginx.md index 831e471e8..9151817e3 100644 --- a/docs/networking/proxies/nginx.md +++ b/docs/networking/proxies/nginx.md @@ -397,7 +397,11 @@ These are provided as an alternative to the generic Nginx error page, are shared ### Default site -By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. If this is not the desired behavior, you may want to add the following configuration to the global nginx configuration. +By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. + +> Note that some versions of Nginx may create a default site (a static page which says "Welcome to Nginx") when installed. If this default site is enabled, it will not route any requests with an unknown HOST header to Dokku. If you want Dokku to receive all requests, disable this default site by removing the `/etc/nginx/sites-enabled/default` file, and then restart nginx. + +If Dokku handling all requests is not the desired behavior, you may want to add the following configuration to the global nginx configuration. Create the file at `/etc/nginx/conf.d/00-default-vhost.conf`: From 60d1422b2698a98525ae7bcfed96c2f71f115958 Mon Sep 17 00:00:00 2001 From: Kurtis Jensen Date: Mon, 2 Jan 2023 03:53:18 +0000 Subject: [PATCH 2/3] wording update --- docs/networking/proxies/nginx.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/networking/proxies/nginx.md b/docs/networking/proxies/nginx.md index 9151817e3..ba4307a23 100644 --- a/docs/networking/proxies/nginx.md +++ b/docs/networking/proxies/nginx.md @@ -399,7 +399,7 @@ These are provided as an alternative to the generic Nginx error page, are shared By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. -> Note that some versions of Nginx may create a default site (a static page which says "Welcome to Nginx") when installed. If this default site is enabled, it will not route any requests with an unknown HOST header to Dokku. If you want Dokku to receive all requests, disable this default site by removing the `/etc/nginx/sites-enabled/default` file, and then restart nginx. +> Note that some versions of Nginx may create a default site when installed. This site is simply a static page which says "Welcome to Nginx", and if this default site is enabled, Nginx will not route any requests with an unknown HOST header to Dokku. If you want Dokku to receive all requests, disable this default site by removing the `/etc/nginx/sites-enabled/default` file, and then restart Nginx. If Dokku handling all requests is not the desired behavior, you may want to add the following configuration to the global nginx configuration. From 966daac0403b7011dc7c4764bcc0bef23bbe0824 Mon Sep 17 00:00:00 2001 From: Kurtis Jensen Date: Mon, 2 Jan 2023 04:48:02 +0000 Subject: [PATCH 3/3] addresses feedback on docs --- docs/networking/proxies/nginx.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/networking/proxies/nginx.md b/docs/networking/proxies/nginx.md index ba4307a23..aaa5d90db 100644 --- a/docs/networking/proxies/nginx.md +++ b/docs/networking/proxies/nginx.md @@ -399,7 +399,13 @@ These are provided as an alternative to the generic Nginx error page, are shared By default, Dokku will route any received request with an unknown HOST header value to the lexicographically first site in the nginx config stack. -> Note that some versions of Nginx may create a default site when installed. This site is simply a static page which says "Welcome to Nginx", and if this default site is enabled, Nginx will not route any requests with an unknown HOST header to Dokku. If you want Dokku to receive all requests, disable this default site by removing the `/etc/nginx/sites-enabled/default` file, and then restart Nginx. +> Warning: some versions of Nginx may create a default site when installed. This site is simply a static page which says "Welcome to Nginx", and if this default site is enabled, Nginx will not route any requests with an unknown HOST header to Dokku. If you want Dokku to receive all requests, run the following commands: +> +> ``` +> rm /etc/nginx/sites-enabled/default +> dokku nginx:stop +> dokku nginx:start +> ``` If Dokku handling all requests is not the desired behavior, you may want to add the following configuration to the global nginx configuration.