mirror of
https://github.com/thib8956/nginx-proxy
synced 2025-08-24 00:11:55 +00:00
Merge branch 'master' into feature_x_forwarded_port
This commit is contained in:
18
README.md
18
README.md
@@ -1,4 +1,4 @@
|
||||
  [](https://travis-ci.org/jwilder/nginx-proxy) [](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub') [](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub')
|
||||
  [](https://travis-ci.org/jwilder/nginx-proxy) [](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub') [](https://hub.docker.com/r/jwilder/nginx-proxy 'DockerHub')
|
||||
|
||||
|
||||
nginx-proxy sets up a container running nginx and [docker-gen][1]. docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped.
|
||||
@@ -42,7 +42,7 @@ services:
|
||||
```shell
|
||||
$ docker-compose up
|
||||
$ curl -H "Host: whoami.local" localhost
|
||||
I''m 5b129ab83266
|
||||
I'm 5b129ab83266
|
||||
```
|
||||
|
||||
### Multiple Ports
|
||||
@@ -78,6 +78,12 @@ In this example, the `my-nginx-proxy` container will be connected to `my-network
|
||||
|
||||
If you would like to connect to your backend using HTTPS instead of HTTP, set `VIRTUAL_PROTO=https` on the backend container.
|
||||
|
||||
### uWSGI Backends
|
||||
|
||||
If you would like to connect to uWSGI backend, set `VIRTUAL_PROTO=uwsgi` on the
|
||||
backend container. Your backend container should than listen on a port rather
|
||||
than a socket and expose that port.
|
||||
|
||||
### Default Host
|
||||
|
||||
To set the default host for nginx use the env var `DEFAULT_HOST=foo.bar.com` for example
|
||||
@@ -92,6 +98,14 @@ image and the official [nginx](https://registry.hub.docker.com/_/nginx/) image.
|
||||
|
||||
You may want to do this to prevent having the docker socket bound to a publicly exposed container service.
|
||||
|
||||
You can demo this pattern with docker-compose:
|
||||
|
||||
```console
|
||||
$ docker-compose --file docker-compose-separate-containers.yml up
|
||||
$ curl -H "Host: whoami.local" localhost
|
||||
I'm 5b129ab83266
|
||||
```
|
||||
|
||||
To run nginx proxy as a separate container you'll need to have [nginx.tmpl](https://github.com/jwilder/nginx-proxy/blob/master/nginx.tmpl) on your host system.
|
||||
|
||||
First start nginx with a volume:
|
||||
|
Reference in New Issue
Block a user