From 672f3d40be83d9e380fd7be4b674d5e8d5fa36de Mon Sep 17 00:00:00 2001 From: HuabingZhao Date: Tue, 25 Jul 2017 15:18:33 +0800 Subject: Divide the MSB source codes into two repos Change-Id: Ie76d545b214a8ce5191f215350a623e1529983d9 Issue-id: MSB-5 Signed-off-by: HuabingZhao --- .../resources/openresty/nginx/msb-enabled/msb.conf | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf (limited to 'openresty-ext/src/assembly/resources/openresty/nginx/msb-enabled/msb.conf') 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 -- cgit 1.2.3-korg