Ticket #1579: test-site.conf

File test-site.conf, 1.4 KB (added by predatory.kangaroo@…, 8 years ago)

Test site config

Line 
1upstream ka-test {
2 zone ka-shm 64k;
3 server 127.0.0.1:8080 max_conns=1000;
4 keepalive 64;
5}
6
7upstream self {
8 zone self-shm 64k;
9 server 127.0.0.1:82 max_conns=1000;
10 keepalive 64;
11}
12
13server {
14 listen 81 default_server;
15 listen [::]:81 default_server;
16
17 server_name _;
18
19 access_log off;
20
21 location / {
22 proxy_pass http://self;
23 proxy_set_header Connection "";
24 proxy_http_version 1.1;
25 proxy_ignore_client_abort on;
26 }
27
28 location /direct {
29 proxy_pass http://ka-test;
30 proxy_set_header Connection "";
31 proxy_http_version 1.1;
32 proxy_ignore_client_abort on;
33 }
34
35 location /redirect {
36 try_files /non.existant /direct;
37 }
38
39 location /auth {
40 auth_request /direct;
41
42 proxy_pass http://self;
43 proxy_set_header Connection "";
44 proxy_http_version 1.1;
45 proxy_ignore_client_abort on;
46 }
47
48 location /additions {
49 add_after_body /direct;
50 addition_types *;
51
52 proxy_pass http://self;
53 proxy_set_header Connection "";
54 proxy_http_version 1.1;
55 proxy_ignore_client_abort on;
56 }
57
58 location /mirror {
59 # Mirror doesn't trigger on a return, so we'll pass to ourselves
60 mirror /direct;
61 mirror_request_body off;
62
63 proxy_pass http://self;
64 proxy_set_header Connection "";
65 proxy_http_version 1.1;
66 proxy_ignore_client_abort on;
67 }
68
69 location /error {
70 error_page 404 =200 /direct;
71
72 return 404;
73 }
74}
75
76server {
77 listen 82;
78
79 access_log off;
80
81 location / {
82 return 200 "AB";
83 }
84}
85