2 # Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
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.
16 # Author: Zhaoxing Meng
17 # email: meng.zhaoxing1@zte.com.cn
23 error_log logs/error.log warn;
27 worker_connections 1024;
32 default_type application/octet-stream;
35 server_names_hash_bucket_size 128;
36 keepalive_timeout 120s;
38 #the maximum allowed size of the client request body,current 10G
39 client_max_body_size 10240m;
40 client_body_buffer_size 128k;
42 #set the time wait for connect to proxy_pass target,avoid waiting too long
43 proxy_connect_timeout 10s;
44 proxy_read_timeout 120s;
45 proxy_send_timeout 120s;
46 proxy_set_header X-Real-IP $remote_addr;
47 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
48 proxy_set_header Host $host;
51 #set the nginx_cache parameter
52 proxy_cache_path temp/proxy_cache levels=1:2 keys_zone=nginx_cache:256m inactive=1d max_size=1g;
58 lua_package_path "$prefix/../lualib/?.lua;$prefix/luaext/?.lua;;";
59 lua_package_cpath "$prefix/../lualib/?.so;;";
61 lua_shared_dict ceryx 10M;
64 # see https://github.com/openresty/lua-resty-core
66 # require "resty.core"
71 include ../sites-enabled/*.conf;