diff options
Diffstat (limited to 'docker/nginx/nginx.conf')
-rw-r--r-- | docker/nginx/nginx.conf | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf new file mode 100644 index 0000000..027d107 --- /dev/null +++ b/docker/nginx/nginx.conf @@ -0,0 +1,29 @@ +http { + + upstream httpbin { + server httpbin:80; + } + + server { + listen 80; + + location / { + proxy_pass http://httpbin; + proxy_intercept_errors on; + } + + # With the above "proxy_intercept_errors" option, this will capture any + # upstream 500/504 errors and return a 302 to a different url + error_page 500 504 /custom-errors.html; + location = /custom-errors.html { + return 302 http://127.0.0.1:8822/status/200; + } + } +} + +events { + worker_connections 1024; +} + +worker_rlimit_nofile 8192; + |