aboutsummaryrefslogtreecommitdiff
path: root/docker/nginx/nginx.conf
blob: 027d10791807174456bdf202b06ec6012f72f310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;