1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 09:48:14 +00:00

docs: update DEFAULT_ROOT documentation

Co-authored-by: Jonathan Underwood <junderwood@bitcoinbank.co.jp>
This commit is contained in:
Nicolas Duchon 2021-08-14 21:40:25 +02:00
parent efb250da01
commit 12887a977b
No known key found for this signature in database
GPG Key ID: 91EF7BB1EECB961A

View File

@ -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. 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. 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 ### Multiple Networks