From d8c564d9267566442e86c79bc01d334ebb3f9a30 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Thu, 22 Jan 2015 16:18:45 -0800 Subject: [PATCH] [ci skip] document default sites in nginx. closes #650 --- docs/nginx.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/nginx.md b/docs/nginx.md index 1f2688b97..ffeafbfb6 100644 --- a/docs/nginx.md +++ b/docs/nginx.md @@ -158,3 +158,18 @@ CONTAINER ID IMAGE COMMAND CREATED d6499edb0edb dokku/node-js-app:latest "/bin/bash -c '/star About a minute ago Up About a minute 0.0.0.0:49153->5000/tcp nostalgic_tesla ``` + +# 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 nginx. This will catch all unknown HOST header values and return a `410 Gone` response. + +``` +server { + listen 80 default_server; + listen [::]:80 default_server; + + server_name _; + return 410; + log_not_found off; +} +```