nginx.conf 848 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
worker_processes 5;
worker_rlimit_nofile 8192;

events {
    worker_connections 4096;
}

http {
    default_type application/octet-stream;
    sendfile     on;
    tcp_nopush   on;
    server_names_hash_bucket_size 128;

    proxy_cache_path /opt/cache levels=1:2 keys_zone=dta_cache:10m max_size=10g inactive=60m use_temp_path=off;

    server {
        listen 8080;

19
        location /v1/task {
20
21
22
            proxy_cache dta_cache;
            proxy_cache_background_update on;
            proxy_cache_lock on;
23
            proxy_cache_key     "$scheme$request_uri";
24
25
26
            proxy_cache_valid    200 302 1d;
            proxy_cache_methods GET HEAD POST;

27
            proxy_pass http://backendcomposedta:8080/v1/task;
28
29
30
        }

        location /v1/unittest {
31
            proxy_pass http://backendcomposedta:8080/v1/unittest;
32
33
34
        }
    }
}