2 # Copyright (C) 2017-2018 ZTE, Inc. and others. All rights reserved. (ZTE)
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 #the maximum allowed size of the client request body,current 10G
18 client_max_body_size 10240m;
19 client_body_buffer_size 128k;
21 #set conf for proxy pass
22 proxy_connect_timeout 5s;
23 proxy_read_timeout 1200s;
24 proxy_send_timeout 1200s;
25 proxy_set_header X-Real-IP $remote_addr;
26 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
27 proxy_set_header Host $host:$server_port;
28 #proxy_set_header Host $svc_name;
30 proxy_http_version 1.1;
31 proxy_set_header Connection "";
33 #set the nginx_cache parameter
34 proxy_cache_path temp/proxy_cache levels=1:2 keys_zone=nginx_cache:100m inactive=1d max_size=1g;
35 proxy_cache_key $host$uri$is_args$args;
36 proxy_cache_revalidate on;
37 proxy_cache_min_uses 3;
38 proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
41 proxy_next_upstream error timeout;
42 proxy_next_upstream_tries 5;
45 lua_package_path "$prefix/../lualib/?.lua;$prefix/luaext/?.lua;$prefix/luaext/vendor/?.lua;;";
46 lua_package_cpath "$prefix/../lualib/?.so;;";
47 #lua_shared_dict rr_cache 1M;
48 #lua_shared_dict rr_locks 100k;
50 lua_shared_dict svc_cache 5M;
51 lua_shared_dict locks 200k;
52 lua_shared_dict stats 1M;
53 lua_shared_dict dns_cache 1M;
57 # Basic reverse proxy server processor
58 upstream defaultbackend {
60 balancer_by_lua_file luaext/loadbalance/balancer.lua;
66 stats = require ('monitor.stats')
68 init_worker_by_lua_block {
73 include ../msb-enabled/location-default/msblocations.conf;
74 # Add below settings for making SDC to work
75 underscores_in_headers on;