hs-test: nginx mirroring test improvements
[vpp.git] / extras / hs-test / resources / nginx / nginx_proxy_mirroring.conf
1 master_process on;
2 worker_processes 4;
3 worker_rlimit_nofile 102400;
4 daemon off;
5
6 error_log /tmp/nginx/error.log;
7
8 events {
9   use epoll;
10   worker_connections 102400;
11   accept_mutex off;
12 }
13
14 http {
15   include mime.types;
16   default_type application/octet-stream;
17
18   access_log off;
19
20   keepalive_timeout 300;
21   keepalive_requests 1000000;
22
23   proxy_connect_timeout 300;
24   large_client_header_buffers 4 512k;
25   client_max_body_size 3000m;
26   client_header_buffer_size 2048m;
27   client_body_buffer_size 1024m;
28   proxy_buffers 16 10240k;
29   proxy_buffer_size 10240k;
30
31   gzip on;
32
33   upstream bk {
34     server {{.Server}}:8091;
35     keepalive 30000;
36   }
37   upstream bk1 {
38     server {{.Server}}:8092;
39     keepalive 30000;
40   }
41   upstream bk2 {
42     server {{.Server}}:8093;
43     keepalive 30000;
44   }
45
46   server {
47     listen 80;
48     server_name {{.Proxy}};
49
50     server_tokens off;
51
52     proxy_redirect off;
53
54     location / {
55       root html;
56       index index.html index.htm;
57       proxy_pass http://bk;
58       proxy_set_header Connection "";
59       proxy_set_header X-Original-URI $request_uri;
60       proxy_set_header Host $host:$server_port;
61       chunked_transfer_encoding on;
62       proxy_http_version 1.1;
63       mirror /mimic1;
64       mirror /mimic2;
65       mirror_request_body on;
66     }
67     location /mimic1 {
68       proxy_pass http://bk1$request_uri;
69       proxy_set_header X-Original-URI $request_uri;
70       proxy_set_header Connection "";
71       chunked_transfer_encoding on;
72       proxy_http_version 1.1;
73       proxy_set_header Host $host:$server_port;
74     }
75     location /mimic2 {
76       proxy_pass http://bk2$request_uri;
77       proxy_set_header X-Original-URI $request_uri;
78       proxy_set_header Host $host:$server_port;
79       proxy_set_header Connection "";
80       proxy_http_version 1.1;
81       chunked_transfer_encoding on;
82     }
83   }
84 }