ngx pastebin
Author: TheFlipside
 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
upstream ui_rest {
    server localhost:8080;
}

server {
    listen       80;
    server_name  localhost;
    root   /usr/share/stork/www;
    index  index.html;

    location /api {
        proxy_pass http://ui_rest;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
        proxy_buffering off;
        proxy_set_header Accept-Encoding "";
        proxy_set_header Host $host;
    }

    location /swagger.json {
        proxy_pass http://ui_rest;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
        proxy_buffering off;
        proxy_set_header Accept-Encoding "";
        proxy_set_header Host $host;
    }

    location /stork-install-agent.sh {
        proxy_pass http://ui_rest;
        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
        proxy_buffering off;
        proxy_set_header Accept-Encoding "";
        proxy_set_header Host $host;
    }

    location /metrics {
        allow 127.0.0.1;
        deny all;

        proxy_pass http://ui_rest;
        proxy_buffering off;
        proxy_set_header Accept-Encoding "";
        proxy_set_header Host $host;
    }

    location / {
        try_files $uri $uri/ /index.html;
    }

}
Syntax: nginx | 
Raw |