aboutsummaryrefslogtreecommitdiffstats
path: root/msb-core/openresty-ext/src/assembly/resources/openresty/nginx/conf/nginx.conf
blob: 25cacf9befcd26a211db97d57977c80d0f6f611c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Copyright 2016 2015-2016 ZTE, Inc. and others. All rights reserved.
#
# 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.
#
#     Author: Zhaoxing Meng
#     email: meng.zhaoxing1@zte.com.cn
#

#user xfs xfs;
worker_processes 1;

error_log logs/error.log warn;
pid logs/nginx.pid;

events {
    worker_connections 1024;
}

http {
    # Basic Settings
    default_type  application/octet-stream;   
    sendfile       on;
    tcp_nopush     on;
    server_names_hash_bucket_size 128;  
    keepalive_timeout  120s;
	
	#the maximum allowed size of the client request body,current 10G
	client_max_body_size 10240m; 
    client_body_buffer_size 128k;
	
	#set the time wait for connect to proxy_pass target,avoid waiting too long
	proxy_connect_timeout 10s;
	proxy_read_timeout 3600s;
	proxy_send_timeout 3600s;
	proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_buffers 4 32k;
	
    #set the nginx_cache parameter
    proxy_cache_path  temp/proxy_cache  levels=1:2   keys_zone=nginx_cache:256m inactive=1d max_size=1g;
	
    # Logging
    access_log off;

    # Lua settings
    lua_package_path "$prefix/../lualib/?.lua;$prefix/luaext/?.lua;;";
	lua_package_cpath "$prefix/../lualib/?.so;;";
	
    lua_shared_dict ceryx 10M;
    lua_code_cache on;

    # see https://github.com/openresty/lua-resty-core
    #init_by_lua '
    #    require "resty.core"
    #';

    # Includes
    include mime.types;
    include ../sites-enabled/*.conf;
}