diff --git a/nginx_conf/ssl/README.md b/nginx_conf/README.md similarity index 61% rename from nginx_conf/ssl/README.md rename to nginx_conf/README.md index e6233613..aef42766 100644 --- a/nginx_conf/ssl/README.md +++ b/nginx_conf/README.md @@ -20,4 +20,15 @@ nginx_conf/ In case you want to use a self-signed certificate we provided a script to generate one. -Execute `bash generate-self-signed-cert.sh` on this same directory and the right files will be generated. You must have installed `openssl` locally. +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.htpasswd b/nginx_conf/kibana.htpasswd deleted file mode 100644 index 5008c153..00000000 --- a/nginx_conf/kibana.htpasswd +++ /dev/null @@ -1 +0,0 @@ -foo:$apr1$WwUDPA87$v9Bj8DS5KF9u1wBTtHH.A/ diff --git a/nginx_conf/ssl/generate-self-signed-cert.sh b/nginx_conf/ssl/generate-self-signed-cert.sh index cf0a56f0..f30fd69d 100644 --- a/nginx_conf/ssl/generate-self-signed-cert.sh +++ b/nginx_conf/ssl/generate-self-signed-cert.sh @@ -1,5 +1,8 @@ #!/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"