Browse Source

docs: update DEFAULT_ROOT documentation

Co-authored-by: Jonathan Underwood <junderwood@bitcoinbank.co.jp>
Nicolas Duchon 3 years ago
parent
commit
12887a977b
1 changed files with 5 additions and 0 deletions
  1. 5 0
      README.md

+ 5 - 0
README.md

@@ -154,6 +154,11 @@ This environment variable of the nginx proxy container can be used to customize
 
 For example `DEFAUL_ROOT=418` will return a 418 error page instead of the normal 404 one.
 Another example is `DEFAULT_ROOT="301 https://github.com/nginx-proxy/nginx-proxy/blob/main/README.md"` which would redirect an invalid request to this documentation.
+Nginx variables such as $scheme, $host, and $request_uri can be used. However, care must be taken to make sure the $ signs are escaped properly.
+If you want to use `301 $scheme://$host/myapp1$request_uri` you should use:
+
+* Bash: `DEFAULT_ROOT='301 $scheme://$host/myapp1$request_uri'`
+* Docker Compose yaml: `- DEFAULT_ROOT: 301 $$scheme://$$host/myapp1$$request_uri`
 
 
 ### Multiple Networks