This repository contains Dockerfile of Nginx with authentication configured as a proxy for ElasticSearch
-
Install tools for setting up users sudo apt-get install -y apache2-utils
-
Setup directories sudo mkdir -p /var/www/es sudo mkdir -p /var/log/nginx
-
Install Docker.
-
Build an image from Dockerfile: docker build -t="jbasdf/nginx_es" github.com/jbasdf/nginx_es
docker run -d -p 80:80 jbasdf/nginx_es
docker run -d -p 80:80 --link elasticsearch:elasticsearch -v /var/log/nginx:/var/log/nginx -v /var/www/es:/var/www/es -v /var/www/es_public:/var/www/es_public jbasdf/nginx_es
sudo apt-get install -y apache2-utils
sudo mkdir -p /var/www/es sudo mkdir -p /var/www/es_public
sudo htpasswd -c /var/www/es_public/.htpasswd my_public_user_name
sudo htpasswd -c /var/www/es/.htpasswd my_admin_user_name
Open http://<host>
to see the welcome page.