Updated the GUI to HTTPS
[holmes/rule-management.git] / rulemgt-standalone / src / main / assembly / nginx.conf
index 3714419..a41168a 100644 (file)
@@ -27,9 +27,18 @@ http {
 
     keepalive_timeout  65;
 
+    ssl_session_cache   shared:SSL:10m;
+    ssl_session_timeout 10m;
+
     server {
         listen       9104;
         server_name  localhost;
+        return 302 https://$server_name$request_uri;
+        }
+
+    server {
+        listen       9105 ssl;
+        server_name  localhost;
 
         location / {
             root   /usr/local/openresty/nginx/html;
@@ -39,5 +48,9 @@ http {
             add_header Cache-Control no-cache;
             root html;
         }
+
+        ssl_certificate /etc/ssl/certs/holmes-frontend-selfsigned.crt;
+        ssl_certificate_key /etc/ssl/private/holmes-frontend.key;
+        ssl_dhparam /etc/ssl/certs/dhparam.pem;
     }
 }