Skip to content

Nginx server protected by HTTP Basic Authentification, -> with Docker Compose

Notifications You must be signed in to change notification settings

grvn-ht/docker-Nginx-HTTP-Basic-Authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-Nginx-HTTP-Basic-Authentication

Nginx server protected by HTTP Basic Authentification, -> with Docker Compose

If you want it to work right away you will need to clone this directory:

" git clone "https://github.com/grvn-ht/docker-Nginx-HTTP-Basic-Authentication.git" . "

You will also need to build the Dockerfile into a "apache2-utils:v3" image personnalized:

" docker build . -t apache2-utils

docker run -it apache2-utils:latest bash

mkdir /etc/apache2

touch /etc/apache2/.htpasswd

htpasswd -c /etc/apache2/.htpasswd user1 "

then enter your password, confirm it, quit the container "ctrl+d" and commit it to a new image "apache2-utils:v3":

" docker commit apache2-utils:v3

docker-compose up "

Remember to change the .env file or to change the example.com in nginx-conf/nginx.conf file into your own domain name.

Thanks to: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/

About

Nginx server protected by HTTP Basic Authentification, -> with Docker Compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages