wiki:avoid_upstream_not_found_nginx_using_only_one_server
Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
wiki:avoid_upstream_not_found_nginx_using_only_one_server [2023/03/30 14:52] – created antisa | wiki:avoid_upstream_not_found_nginx_using_only_one_server [2023/03/30 16:09] – [Avoid upstream not found in nginx when using only one upstream server] add resolver info antisa | ||
---|---|---|---|
Line 7: | Line 7: | ||
server { | server { | ||
listen 80; | listen 80; | ||
+ | resolver 127.0.0.11 valid=30s; # docker' | ||
set $target " | set $target " | ||
location / { proxy_pass $target; } | location / { proxy_pass $target; } | ||
Line 13: | Line 14: | ||
This will not error out if the target-host is not available (for example in some Docker setup). | This will not error out if the target-host is not available (for example in some Docker setup). | ||
+ | |||
+ | <WRAP center round help 60%> | ||
+ | resolver is probably needed even when the target host is not a docker container | ||
+ | </ | ||
The following example however will give you an error if the target-host can not be resolved: | The following example however will give you an error if the target-host can not be resolved: |
wiki/avoid_upstream_not_found_nginx_using_only_one_server.txt · Last modified: 2023/04/18 12:34 by antisa