Update Production HTTPS Setup
parent
1216b04eb8
commit
5c97ec33fa
@ -8,7 +8,7 @@
|
||||
- main
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./https/nginx/initial_automatisch_letsencrypt_nginx.conf:/etc/nginx/conf.d/
|
||||
- ./https/nginx/automatisch_letsencrypt_nginx.conf:/etc/nginx/conf.d/
|
||||
- ./certbot/conf:/etc/letsencrypt
|
||||
- ./certbot/www:/var/www/certbot
|
||||
ports:
|
||||
@ -47,7 +47,8 @@ SSL_CERT_EMAIL=support@shilohcode.com
|
||||
```
|
||||
- Run `sudo docker compose up` to generate SSL cert
|
||||
- There should be a new /certbot folder created at the project root, and the cert and key `.pem` files should be created at `/etc/letsencrypt/live`
|
||||
- After this completes, stop the containers `ctrl+c` and change the `nginx` service's `initial_automatisch_letsencrypt_nginx.conf` volume to `secondary_automatisch_letsencrypt_nginx.conf` which has the nginx configs for https/SSL:
|
||||
- After this completes, stop the containers `ctrl+c` and overwrite the `automatisch_letsencrypt_nginx.conf` file with the `secondary_automatisch_letsencrypt_nginx.conf` file's contents which has the 443 https and SSL configs: `cp https/nginx/secondary_automatisch_letsencrypt_nginx.conf https/nginx/automatisch_letsencrypt_nginx.conf`
|
||||
- `automatisch_letsencrypt_nginx.conf` should then look like this:
|
||||
```
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
@ -63,7 +64,7 @@ SSL_CERT_EMAIL=support@shilohcode.com
|
||||
- 443:443
|
||||
```
|
||||
|
||||
- In the `secondary_automatisch_letsencrypt_nginx.conf` file, add the HOST entries to the file and save it before continuing:
|
||||
- Add the HOST entries to `automatisch_letsencrypt_nginx.conf` and save before continuing:
|
||||
```
|
||||
# nginx conf file to use after LetsEncrypt SSL certs have been created
|
||||
# replace<HOSTNAME> with your DNS i.e.automatisch.lasthourhosting.org
|
||||
|
Loading…
x
Reference in New Issue
Block a user