msb protocol synch change
[msb/apigateway.git] / msb-core / openresty-ext / src / assembly / resources / openresty / nginx / conf / nginx.conf
1 #
2 # Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
3 #
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
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16 #     Author: Zhaoxing Meng
17 #     email: meng.zhaoxing1@zte.com.cn
18 #
19
20 #user xfs xfs;
21 worker_processes 1;
22
23 error_log logs/error.log warn;
24 pid logs/nginx.pid;
25
26 events {
27     worker_connections 1024;
28 }
29
30 http {
31     # Basic Settings
32     default_type  application/octet-stream;   
33     sendfile       on;
34     tcp_nopush     on;
35     server_names_hash_bucket_size 128;  
36     keepalive_timeout  120s;
37         
38         #the maximum allowed size of the client request body,current 10G
39         client_max_body_size 10240m; 
40     client_body_buffer_size 128k;
41         
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;
49     proxy_buffers 4 32k;
50         
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;
53         
54     # Logging
55     access_log off;
56
57     # Lua settings
58     lua_package_path "$prefix/../lualib/?.lua;$prefix/luaext/?.lua;;";
59         lua_package_cpath "$prefix/../lualib/?.so;;";
60         
61     lua_shared_dict ceryx 10M;
62     lua_code_cache on;
63
64     # see https://github.com/openresty/lua-resty-core
65     #init_by_lua '
66     #    require "resty.core"
67     #';
68
69     # Includes
70     include mime.types;
71     include ../sites-enabled/*.conf;
72 }