mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2024-05-09 00:56:07 +02:00
dfd4f54c61
Before, if a site's certificate was not found, the site was served over http rather than https. Failing open like this is problematic for sites where security is important. Presumably the user set `HTTPS_METHOD` to a non-`noredirect` value (or left it unset) for a good reason; we should honor it even if it means serving error messages. WARNING: This change breaks compatibility. Any vhost where all of the following are true will fail after this change: * `HTTPS_METHOD` is either unset or set to a value other than `nohttps`. * The vhost does not have its own certificate (`default.crt` doesn't count). * Clients expect to be able to access the vhost by using plain http to nginx-proxy. To get the previous behavior, set `HTTPS_METHOD` to `nohttps` for the vhost.
30 lines
676 B
YAML
30 lines
676 B
YAML
version: '3'
|
|
services:
|
|
nginx:
|
|
image: nginx
|
|
container_name: nginx
|
|
volumes:
|
|
- nginx_conf:/etc/nginx/conf.d
|
|
|
|
dockergen:
|
|
image: nginxproxy/docker-gen
|
|
command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
|
volumes:
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
|
- ../../nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl
|
|
- nginx_conf:/etc/nginx/conf.d
|
|
environment:
|
|
HTTPS_METHOD: nohttps
|
|
|
|
web:
|
|
image: web
|
|
container_name: whoami
|
|
expose:
|
|
- "80"
|
|
environment:
|
|
WEB_PORTS: 80
|
|
VIRTUAL_HOST: whoami.nginx.container.docker
|
|
|
|
volumes:
|
|
nginx_conf: {}
|