From 0fed6d6e8bb82845d384a2adee4c9a2df6bd505a Mon Sep 17 00:00:00 2001 From: Manuel Gutierrez <1380243+xr09@users.noreply.github.com> Date: Wed, 30 Sep 2020 17:38:38 +0200 Subject: [PATCH] Removing legacy nginx config --- README.md | 8 ----- nginx_conf/README.md | 34 --------------------- nginx_conf/kibana-web.conf | 20 ------------ nginx_conf/ssl/generate-self-signed-cert.sh | 12 -------- 4 files changed, 74 deletions(-) delete mode 100644 nginx_conf/README.md delete mode 100644 nginx_conf/kibana-web.conf delete mode 100644 nginx_conf/ssl/generate-self-signed-cert.sh diff --git a/README.md b/README.md index e28fe2fc..7c3c87f6 100644 --- a/README.md +++ b/README.md @@ -26,9 +26,6 @@ In addition, a docker-compose file is provided to launch the containers mentione Before starting the environment it is required to provide an SSL certificate (or just generate one self-signed) and setup the basic auth. -Documentation on how to provide these two can be found at [nginx_conf/README.md](nginx_conf/README.md). - - ## Directory structure wazuh-docker @@ -50,11 +47,6 @@ Documentation on how to provide these two can be found at [nginx_conf/README.md] │   │   └── xpack_config.sh │   └── Dockerfile ├── LICENSE - ├── nginx_conf - │   ├── kibana-web.conf - │   ├── README.md - │   └── ssl - │   └── generate-self-signed-cert.sh ├── README.md ├── VERSION └── wazuh diff --git a/nginx_conf/README.md b/nginx_conf/README.md deleted file mode 100644 index aef42766..00000000 --- a/nginx_conf/README.md +++ /dev/null @@ -1,34 +0,0 @@ - -### Enable SSL Traffic - -Our Nginx config has SSL enabled by default, but it does require you to provide your certificate first, copy here your certificate files as `kibana-access.pem` and `kibana-access.key`. - -The final tree should be like this: - -``` -nginx_conf/ -├── kibana.htpasswd -├── kibana-web.conf -└── ssl - ├── kibana-access.key - └── kibana-access.pem -``` - - - -#### Using a Self Signed Certificate - -In case you want to use a self-signed certificate we provided a script to generate one. - -Execute `bash generate-self-signed-cert.sh` inside the `ssl` directory and it will be generated. You must install `openssl` first. - - -### Setup Basic Authentication - -The nginx configuration expects the file `kibana.htpasswd`. - -This file can be generated with the `htpasswd` command. - -```bash -htpasswd -c kibana.htpasswd username -``` diff --git a/nginx_conf/kibana-web.conf b/nginx_conf/kibana-web.conf deleted file mode 100644 index 9ac5b667..00000000 --- a/nginx_conf/kibana-web.conf +++ /dev/null @@ -1,20 +0,0 @@ -server { - listen 80; - listen [::]:80; - return 301 https://$host:443$request_uri; -} - -server { - listen 443 default_server ssl http2; - listen [::]:443 ssl http2; - ssl_certificate /etc/nginx/conf.d/ssl/kibana-access.pem; - ssl_certificate_key /etc/nginx/conf.d/ssl/kibana-access.key; - location / { - # auth_basic "Restricted Access"; - # auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd; - proxy_pass http://kibana:5601/; - proxy_buffer_size 128k; - proxy_buffers 4 256k; - proxy_busy_buffers_size 256k; - } -} diff --git a/nginx_conf/ssl/generate-self-signed-cert.sh b/nginx_conf/ssl/generate-self-signed-cert.sh deleted file mode 100644 index f30fd69d..00000000 --- a/nginx_conf/ssl/generate-self-signed-cert.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -cd $DIR - -if [ -s kibana-access.key ] -then - echo "Aborting. Certificate already exists" - exit -else - openssl req -x509 -batch -nodes -days 365 -newkey rsa:2048 -keyout kibana-access.key -out kibana-access.pem -fi