Skip to content

Commit bf32dc3

Browse files
committed
Use certbox nginx
1 parent 094d143 commit bf32dc3

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ To start using this software, clone this repository and then run `docker-compose
88

99
## Obtaining new certificates from Let's Encrypt
1010
```
11-
certbot certonly --webroot -w /var/www/letsencrypt/ -d example.com
12-
```
13-
14-
This command may be run on the host machine through `docker exec` as follows:
15-
```
16-
docker exec -ti nginx-https-proxy_app_1 certbot certonly --webroot -w /var/www/letsencrypt/ -d example.com
11+
certbot --nginx -d example.com
1712
```
1813

1914
The helper script `gen-cert.sh` will run the above command inside the nginx Docker container for you.
@@ -34,6 +29,7 @@ Running the service is as easy as `docker-compose up` (or `docker-compose up --b
3429
## Notes
3530

3631
If you want to generate your own SSL key for testing, you can do so with OpenSSL. You must rename the files accordingly.
32+
3733
```
3834
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=example.com'
3935
```

gen-cert.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
docker exec -ti nginx-https-proxy_app_1 certbot certonly --webroot -w /var/www/letsencrypt/ -d $1
3+
docker exec -ti nginx-https-proxy_app_1 certbot --nginx -d $1

0 commit comments

Comments
 (0)