Function test updates
[nonrtric.git] / test / cr / app / nginx.conf
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2020-2023 Nordix Foundation. 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 #  ============LICENSE_END=================================================
16 #
17
18 worker_processes auto;
19 pid /run/nginx.pid;
20 include /etc/nginx/modules-enabled/*.conf;
21
22 events {
23     worker_connections 768;
24 }
25
26 http {
27
28     ##
29     # Basic Settings
30     ##
31
32     sendfile on;
33     tcp_nopush on;
34     tcp_nodelay on;
35     keepalive_timeout 65;
36     types_hash_max_size 2048;
37
38     include /etc/nginx/mime.types;
39     default_type application/octet-stream;
40
41     server { # simple reverse-proxy
42         listen      8090;
43         listen      [::]:8090;
44         listen      8091 ssl;
45         listen      [::]:8091 ssl;
46         server_name  localhost;
47         ssl_certificate     /usr/src/app/cert/cert.crt;
48         ssl_certificate_key /usr/src/app/cert/key.crt;
49         ssl_password_file   /usr/src/app/cert/pass;
50
51         # serve dynamic requests
52         location / {
53            proxy_set_header   Host                 $host;
54            proxy_set_header   X-Real-IP            $remote_addr;
55            proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;
56            proxy_pass      http://localhost:2222;
57
58            client_max_body_size 0;
59         }
60
61     }
62     ##
63     # SSL Settings
64     ##
65
66     ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
67     ssl_prefer_server_ciphers on;
68
69     ##
70     # Logging Settings
71     ##
72
73     access_log /var/log/nginx/access.log;
74     error_log /var/log/nginx/error.log;
75
76 }