mirror of
				https://github.com/thib8956/nginx-proxy
				synced 2025-10-31 09:09:20 +00:00 
			
		
		
		
	feat: Add user customizable default root response
This commit is contained in:
		
				
					committed by
					
						 Nicolas Duchon
						Nicolas Duchon
					
				
			
			
				
	
			
			
			
						parent
						
							28c73e5b52
						
					
				
				
					commit
					9df330e51e
				
			
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -123,6 +123,16 @@ You can have multiple containers proxied by the same `VIRTUAL_HOST` by adding a | ||||
|  | ||||
| The full request URI will be forwarded to the serving container in the `X-Forwarded-Path` header. | ||||
|  | ||||
| **NOTE**: Your application needs to be able to generate links starting with `VIRTUAL_PATH`. This can be achieved by it being natively on this path or havin an option to prepend this path. The application does not need to expect this path in the request. | ||||
|  | ||||
| #### DEFAULT_ROOT | ||||
|  | ||||
| This environment variable of the nginx proxy container can be used to customize the return error page if no matching path is found. Furthermore it is possible to use anything which is compatible with the `return` statement of nginx. | ||||
|  | ||||
| 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. | ||||
|  | ||||
|  | ||||
| ### Multiple Networks | ||||
|  | ||||
| With the addition of [overlay networking](https://docs.docker.com/engine/userguide/networking/get-started-overlay/) in Docker 1.9, your `nginx-proxy` container may need to connect to backend containers on multiple networks. By default, if you don't pass the `--net` flag when your `nginx-proxy` container is created, it will only be attached to the default `bridge` network. This means that it will not be able to connect to containers on networks other than `bridge`. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user