1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-08-23 07:51:56 +00:00

Clear instruction for naming of htpasswd file

Previous instructions could make the impression that user have to create a directory named as the virtual host and also a file named as the virutal host.
This commit is contained in:
uak
2025-05-03 08:14:06 +00:00
committed by GitHub
parent 45342410bf
commit f091544c27

View File

@@ -333,7 +333,7 @@ See the [nginx keepalive documentation](https://nginx.org/en/docs/http/ngx_http_
## Basic Authentication Support ## Basic Authentication Support
In order to be able to secure your virtual host, you have to create a file named as its equivalent `VIRTUAL_HOST` variable (or if using a regex `VIRTUAL_HOST`, as the sha1 hash of the regex) in directory In order to be able to secure your virtual host, you have to create a file named as its equivalent `VIRTUAL_HOST` variable (or if using a regex `VIRTUAL_HOST`, as the sha1 hash of the regex) in directory
`/etc/nginx/htpasswd/{$VIRTUAL_HOST}` `/etc/nginx/htpasswd/`. Example: `/etc/nginx/htpasswd/app.example.com`.
```console ```console
docker run -d -p 80:80 -p 443:443 \ docker run -d -p 80:80 -p 443:443 \