Removing legacy nginx config

This commit is contained in:
Manuel Gutierrez
2020-09-30 18:04:20 +02:00
parent 9a58958bcb
commit 0fed6d6e8b
4 changed files with 0 additions and 74 deletions
-8
View File
@@ -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
-34
View File
@@ -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
```
-20
View File
@@ -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;
}
}
@@ -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