Updated to Java 11
[holmes/rule-management.git] / rulemgt-standalone / src / main / assembly / nginx-https.conf
1 #user  nobody;
2 worker_processes  1;
3
4 error_log  logs/error.log;
5 error_log  logs/error.log  notice;
6 error_log  logs/error.log  info;
7
8 pid        logs/nginx.pid;
9
10
11 events {
12     worker_connections  1024;
13 }
14
15
16 http {
17     include       mime.types;
18     default_type  application/octet-stream;
19
20     log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
21                       '$status $body_bytes_sent "$http_referer" '
22                       '"$http_user_agent" "$http_x_forwarded_for"';
23
24     #access_log  logs/access.log  main;
25
26     sendfile        on;
27
28     keepalive_timeout  65;
29
30     ssl_session_cache   shared:SSL:10m;
31     ssl_session_timeout 10m;
32
33     server {
34         listen       9104 ssl;
35         server_name  _;
36
37         location / {
38             root   /usr/local/openresty/nginx/html;
39
40             proxy_set_header Host $host;
41             proxy_set_header X-Real-IP $remote_addr;
42             proxy_redirect off;
43
44             if ($uri ~ "/api/holmes-rule-mgmt/(.*)") {
45                 proxy_pass https://$host:9101$request_uri;
46                 break;
47             }
48
49             if ($uri ~ "/api/holmes-engine-mgmt/(.*)") {
50                 proxy_pass https://$host:9102$request_uri;
51                 break;
52             }
53         }
54
55         location ~*.(htm|html){
56             add_header Cache-Control no-cache;
57             root html;
58         }
59
60         ssl_certificate /etc/ssl/public/holmes-frontend-selfsigned.crt;
61         ssl_certificate_key /etc/ssl/private/holmes-frontend.key;
62         ssl_dhparam /etc/ssl/public/dhparam.pem;
63     }
64 }