Dockerfile to create docker image, based on official nginx image + atomx/nginx-http-auth-digest
docker pull nginx-digest
in your nginx.conf or site config use the following construction:
auth_digest_user_file /etc/nginx/.htdigest; # a file created with htdigest
location /private {
auth_digest 'this is not for you'; # set the realm for this location block
}
for more details please check the official documentation
git clone https://github.com/denisix/nginx-digest
docker build -t nginx-digest:latest .
- this image uses nginx-http-auth-digest module