Initial code import
[msb/apigateway.git] / openresty-ext / src / assembly / resources / openresty / nginx / conf / nginx.conf
1 #
2 # Copyright (C) 2016 ZTE, Inc. and others. All rights reserved. (ZTE)
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
17 #user  nobody;
18 worker_processes  auto;
19 worker_rlimit_nofile 50000; 
20
21 error_log  logs/error.log  warn;
22 pid        logs/nginx.pid;
23
24 events {
25     #linux下打开提高性能
26     #use epoll; 
27     worker_connections  2048;
28     multi_accept on; 
29 }
30
31 http {
32     server_tokens off;
33     include mime.types;
34     default_type text/html; 
35
36     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
37     #                  '$status $body_bytes_sent "$http_referer" '
38     #                  '"$http_user_agent" "$http_x_forwarded_for"';
39
40     #access_log  logs/access.log  main;
41     access_log off; 
42         
43     sendfile        on;
44     tcp_nopush     on;
45         
46     keepalive_timeout  120s;
47         
48     gzip  on;
49
50     include ../msb-enabled/*.conf;
51         include ../sites-enabled/*.conf;
52         include ../sites-enabled-mount/*.conf;
53 }
54
55 stream {
56     include ../stream-enabled/*;
57 }