[MSB]Support TLSv1.3
[msb/apigateway.git] / openresty-ext / src / assembly / resources / openresty / nginx / conf / nginx.conf
1 #
2 # Copyright (C) 2017-2018 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  8;
19 worker_rlimit_nofile 65535;
20
21 error_log  logs/error.log  info;
22 pid        logs/nginx.pid;
23
24 env ROUTER_SUBDOMAIN;
25 env HTTP_OVERWRITE_PORT;
26 env HTTPS_OVERWRITE_PORT;
27
28 events {
29         #there is normally no need to specify the following directive explicitly
30         #use epoll;
31         worker_connections  10000;
32         multi_accept off;
33 }
34
35 http {
36         include mime.types;
37         #default_type text/html; 
38
39         log_format  main  '$remote_addr - $remote_user [$time_local] $request_id "$request" '
40                           '$status request_processing_time:$request_time upstream_response_time:$upstream_response_time '
41                           '"$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
42
43         access_log  logs/access.log  main;
44         #access_log off; 
45         
46         sendfile       on;
47         tcp_nopush     on;
48         tcp_nodelay    on;
49         
50         server_tokens off;
51         
52         keepalive_timeout 120s;
53     keepalive_requests 2000;
54     types_hash_max_size 2048;
55         
56         #open_file_cache max=200000 inactive=300s;
57     #open_file_cache_valid 300s;
58     #open_file_cache_min_uses 2;
59     #open_file_cache_errors on;
60         
61         gzip  on;
62         gzip_min_length 1k;
63         gzip_buffers 4 16k;
64         gzip_comp_level 2;
65         gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml;
66         
67         include ../msb-enabled/*.conf;
68         include ../sites-enabled/*.conf;
69         include ../sites-enabled-mount/*.conf;
70 }
71
72 stream {
73         include ../stream-enabled/*.conf;
74 }