summaryrefslogtreecommitdiffstats
path: root/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-07-25 15:18:33 +0800
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-07-25 18:11:59 +0800
commit672f3d40be83d9e380fd7be4b674d5e8d5fa36de (patch)
tree43105e1d5e2ba8e8accea8648e57e1cf87db3f00 /openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf
parent41d3db15a8e1a0496f9c2a5e15db2998a32bb9bf (diff)
Divide the MSB source codes into two repos
Change-Id: Ie76d545b214a8ce5191f215350a623e1529983d9 Issue-id: MSB-5 Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf')
-rw-r--r--openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf67
1 files changed, 67 insertions, 0 deletions
diff --git a/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf
new file mode 100644
index 0000000..8e854bb
--- /dev/null
+++ b/openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf
@@ -0,0 +1,67 @@
+#
+# Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#the maximum allowed size of the client request body,current 10G
+client_max_body_size 10240m;
+client_body_buffer_size 128k;
+
+#set conf for proxy pass
+proxy_connect_timeout 5s;
+proxy_read_timeout 1200s;
+proxy_send_timeout 1200s;
+proxy_set_header X-Real-IP $remote_addr;
+proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+proxy_set_header Host $host:$server_port;
+proxy_buffers 4 16k;
+proxy_http_version 1.1;
+proxy_set_header Connection "";
+
+#set the nginx_cache parameter
+proxy_cache_path temp/proxy_cache levels=1:2 keys_zone=nginx_cache:100m inactive=1d max_size=1g;
+proxy_cache_key $host$uri$is_args$args;
+proxy_cache_revalidate on;
+proxy_cache_min_uses 3;
+proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
+proxy_cache_lock on;
+
+proxy_next_upstream error timeout;
+proxy_next_upstream_tries 5;
+
+# Lua settings
+lua_package_path "$prefix/../lualib/?.lua;$prefix/luaext/?.lua;;";
+lua_package_cpath "$prefix/../lualib/?.so;;";
+#lua_shared_dict rr_cache 1M;
+#lua_shared_dict rr_locks 100k;
+
+lua_shared_dict svc_cache 5M;
+lua_shared_dict locks 200k;
+
+lua_code_cache on;
+
+# Basic reverse proxy server processor
+upstream defaultbackend {
+ server 0.0.0.1;
+ balancer_by_lua_file luaext/loadbalance/balancer.lua;
+ keepalive 300;
+}
+init_by_lua_block {
+ msb = require('msb')
+ msb.load_plugins()
+}
+server {
+ listen 80;
+ include ../msb-enabled/location-default/msblocations.conf;
+} \ No newline at end of file