Skip to content

Commit 28bdc6b

Browse files
committed
docs: ACME_HTTP_CHALLENGE_LOCATION
1 parent c66ceda commit 28bdc6b

File tree

7 files changed

+18
-20
lines changed

7 files changed

+18
-20
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ It handles the automated creation, renewal and use of SSL certificates for proxi
3131
Three writable volumes must be declared on the **nginx-proxy** container so that they can be shared with the **acme-companion** container:
3232

3333
* `/etc/nginx/certs` to store certificates and private keys (readonly for the **nginx-proxy** container).
34-
* `/etc/nginx/vhost.d` to change the configuration of vhosts (required so the CA may access `http-01` challenge files).
3534
* `/usr/share/nginx/html` to write `http-01` challenge files.
3635

3736
Additionally, a fourth volume must be declared on the **acme-companion** container to store `acme.sh` configuration and state: `/etc/acme.sh`.
@@ -50,7 +49,6 @@ $ docker run --detach \
5049
--publish 80:80 \
5150
--publish 443:443 \
5251
--volume certs:/etc/nginx/certs \
53-
--volume vhost:/etc/nginx/vhost.d \
5452
--volume html:/usr/share/nginx/html \
5553
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
5654
nginxproxy/nginx-proxy

docs/Advanced-usage.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ $ docker run --detach \
2626
--publish 80:80 \
2727
--publish 443:443 \
2828
--volume conf:/etc/nginx/conf.d \
29-
--volume vhost:/etc/nginx/vhost.d \
3029
--volume html:/usr/share/nginx/html \
3130
--volume certs:/etc/nginx/certs \
3231
nginx

docs/Basic-usage.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
## Basic usage (with the nginx-proxy container)
22

3-
Three writable volumes must be declared on the **nginx-proxy** container so that they can be shared with the **acme-companion** container:
3+
Two writable volumes must be declared on the **nginx-proxy** container so that they can be shared with the **acme-companion** container:
44

55
* `/etc/nginx/certs` to store certificates and private keys (readonly for the **nginx-proxy** container).
6-
* `/etc/nginx/vhost.d` to change the configuration of vhosts (required so the CA may access `http-01` challenge files).
76
* `/usr/share/nginx/html` to write `http-01` challenge files.
87

98
Additionally, a fourth volume must be declared on the **acme-companion** container to store `acme.sh` configuration and state: `/etc/acme.sh`.
@@ -22,7 +21,6 @@ $ docker run --detach \
2221
--publish 80:80 \
2322
--publish 443:443 \
2423
--volume certs:/etc/nginx/certs \
25-
--volume vhost:/etc/nginx/vhost.d \
2624
--volume html:/usr/share/nginx/html \
2725
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
2826
nginxproxy/nginx-proxy

docs/Container-configuration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ You can also create test certificates per container (see [Test certificates](./L
3232

3333
* `ACME_PRE_HOOK` - The provided command will be run before every certificate issuance. The action is limited to the commands available inside the **acme-companion** container. For example `--env "ACME_PRE_HOOK=echo 'start'"`. For more information see [Pre- and Post-Hook](./Hooks.md)
3434

35-
* `ACME_POST_HOOK` - The provided command will be run after every certificate issuance. The action is limited to the commands available inside the **acme-companion** container. For example `--env "ACME_POST_HOOK=echo 'end'"`. For more information see [Pre- and Post-Hook](./Hooks.md)
35+
* `ACME_POST_HOOK` - The provided command will be run after every certificate issuance. The action is limited to the commands available inside the **acme-companion** container. For example `--env "ACME_POST_HOOK=echo 'end'"`. For more information see [Pre- and Post-Hook](./Hooks.md)
36+
37+
* `ACME_HTTP_CHALLENGE_LOCATION` - Previously **acme-companion** automatically added the ACME HTTP challenge location to the nginx configuration through files generated in `/etc/nginx/vhost.d`. Recent versions of **nginx-proxy** (>= `1.6`) already include the required location configuration, which remove the need for **acme-companion** to attempt to dynamically add them. If you're running and older version of **nginx-proxy** (or **docker-gen** with an older version of the `nginx.tmpl` file), you can re-enable this behaviour by setting `ACME_HTTP_CHALLENGE_LOCATION` to `true`.

docs/Docker-Compose.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The use of named containers and volume is not required but helps keeping everyth
1515
### Two containers example
1616

1717
```yaml
18-
version: '2'
18+
version: "2"
1919

2020
services:
2121
nginx-proxy:
@@ -25,8 +25,10 @@ services:
2525
- "80:80"
2626
- "443:443"
2727
volumes:
28-
- conf:/etc/nginx/conf.d
29-
- vhost:/etc/nginx/vhost.d
28+
# The vhost and conf volumes are only required
29+
# if you plan to obtain standalone certificates
30+
# - vhost:/etc/nginx/vhost.d
31+
# - conf:/etc/nginx/conf.d
3032
- html:/usr/share/nginx/html
3133
- certs:/etc/nginx/certs:ro
3234
- /var/run/docker.sock:/tmp/docker.sock:ro
@@ -46,8 +48,8 @@ services:
4648
network_mode: bridge
4749

4850
volumes:
49-
conf:
50-
vhost:
51+
# vhost:
52+
# conf:
5153
html:
5254
certs:
5355
acme:
@@ -56,7 +58,7 @@ volumes:
5658
### Three containers example
5759
5860
```yaml
59-
version: '2'
61+
version: "2"
6062

6163
services:
6264
nginx-proxy:
@@ -66,8 +68,10 @@ services:
6668
- "80:80"
6769
- "443:443"
6870
volumes:
71+
# The vhost volume is only required if you
72+
# plan to obtain standalone certificates
73+
# - vhost:/etc/nginx/vhost.d
6974
- conf:/etc/nginx/conf.d
70-
- vhost:/etc/nginx/vhost.d
7175
- html:/usr/share/nginx/html
7276
- certs:/etc/nginx/certs:ro
7377
network_mode: bridge
@@ -99,8 +103,8 @@ services:
99103
network_mode: bridge
100104

101105
volumes:
106+
# vhost:
102107
conf:
103-
vhost:
104108
html:
105109
certs:
106110
acme:

docs/Persistent-data.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ $ docker run -d \
1010
-p 80:80 \
1111
-p 443:443 \
1212
-v certs:/etc/nginx/certs \
13-
-v vhost:/etc/nginx/vhost.d \
1413
-v html:/usr/share/nginx/html \
1514
-v /var/run/docker.sock:/tmp/docker.sock:ro \
1615
nginxproxy/nginx-proxy
1716

1817
$ docker volume ls
1918
DRIVER VOLUME NAME
2019
local certs
21-
local vhost
2220
local html
2321
```
2422

@@ -32,15 +30,13 @@ $ docker run -d \
3230
-p 80:80 \
3331
-p 443:443 \
3432
-v /etc/nginx/certs \
35-
-v /etc/nginx/vhost.d \
3633
-v /usr/share/nginx/html \
3734
-v /var/run/docker.sock:/tmp/docker.sock:ro \
3835
nginxproxy/nginx-proxy
3936

4037
$ docker volume ls
4138
DRIVER VOLUME NAME
4239
local 287be3abd610e5566500d719ceb8b952952f12c9324ef02d05785d4ee9737ae9
43-
local 6530b1b40cf89efb71aa7fd19bddec927fa2bcae59b04b9c1c850af72ffe0123
4440
local f260f71fefadcdfc311d285d69151f2312915174d3fb1fab89949ec5ec871a54
4541
```
4642

docs/Standalone-certificates.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Standalone certificates
22

3-
You can generate certificate that are not tied to containers environment variable by mounting a user configuration file inside the container at `/app/letsencrypt_user_data`. This feature also require sharing the `/etc/nginx/conf.d` folder between the **nginx-proxy** and **acme-companion** container (and the **docker-gen** container if you are running a [three container setup](./Advanced-usage.md)):
3+
You can generate certificate that are not tied to containers environment variable by mounting a user configuration file inside the container at `/app/letsencrypt_user_data`. This feature also require sharing the `/etc/nginx/vhost.d` and `/etc/nginx/conf.d` folder between the **nginx-proxy** and **acme-companion** container (and the **docker-gen** container if you are running a [three container setup](./Advanced-usage.md)):
44

55
```bash
66
$ docker run --detach \
@@ -14,6 +14,7 @@ $ docker run --detach \
1414
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
1515
nginxproxy/nginx-proxy
1616
```
17+
1718
```bash
1819
$ docker run --detach \
1920
--name nginx-proxy-acme \

0 commit comments

Comments
 (0)