Skip to content

Commit b5e6eb2

Browse files
committed
Merge branch 'master' of github.com:evertramos/docker-compose-letsencrypt-nginx-proxy-companion
2 parents 4e8574c + 08caac5 commit b5e6eb2

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

.github/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ docker run -d -e VIRTUAL_HOST=your.domain.com \
9595

9696
> Please note that when running a new container to generate certificates with LetsEncrypt (`-e LETSENCRYPT_HOST=your.domain.com`), it may take a few minutes, depending on multiples circunstances.
9797
98+
## Futher Options
99+
100+
1. Basic Authentication Support
101+
102+
In order to be able to secure your virtual host with basic authentication, you must create a file named as its equivalent VIRTUAL_HOST variable on directory ${NGINX_FILES_PATH}/htpasswd/$VIRTUAL_HOST.
103+
104+
After set up this webproxy, you will do the following:
105+
```bash
106+
sudo sh -c "echo -n 'user_name:' >> ${NGINX_FILES_PATH}/your_domain.com"
107+
sudo sh -c "openssl passwd -apr1 >> ${NGINX_FILES_PATH}/your_domain.com"
108+
```
109+
> Please substitute the `${NGINX_FILES_PATH}` with your path information and your virtual host name as `your_domain.com`.
98110
99111
## Testing your proxy with scripts preconfigured
100112

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ services:
1414
- ${NGINX_FILES_PATH}/vhost.d:/etc/nginx/vhost.d
1515
- ${NGINX_FILES_PATH}/html:/usr/share/nginx/html
1616
- ${NGINX_FILES_PATH}/certs:/etc/nginx/certs:ro
17+
- ${NGINX_FILES_PATH}/htpasswd:/etc/nginx/htpasswd:ro
1718

1819
nginx-gen:
1920
image: jwilder/docker-gen
@@ -25,6 +26,7 @@ services:
2526
- ${NGINX_FILES_PATH}/vhost.d:/etc/nginx/vhost.d
2627
- ${NGINX_FILES_PATH}/html:/usr/share/nginx/html
2728
- ${NGINX_FILES_PATH}/certs:/etc/nginx/certs:ro
29+
- ${NGINX_FILES_PATH}/htpasswd:/etc/nginx/htpasswd:ro
2830
- /var/run/docker.sock:/tmp/docker.sock:ro
2931
- ./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro
3032

0 commit comments

Comments
 (0)