Skip to content

Commit 0ceaf48

Browse files
committed
Improve SSL security
1 parent 4939336 commit 0ceaf48

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +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 --nginx -d example.com
11+
certbot --nginx --no-redirect -d example.com
1212
```
1313

1414
The helper script `gen-cert.sh` will run the above command inside the nginx Docker container for you.

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 --nginx -d $1
3+
docker exec -ti nginx-https-proxy_app_1 certbot --nginx --no-redirect -d $1

nginx/nginx.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ http {
3131
# SSL Settings
3232
##
3333

34-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
34+
ssl_protocols TLSv1.2;
3535
ssl_prefer_server_ciphers on;
36+
ssl_ciphers EECDH+AESGCM:EDH+AESGCM;
37+
ssl_stapling on;
38+
ssl_stapling_verify on;
3639

3740
##
3841
# Logging Settings

nginx/sites-enabled/.example.com

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ server {
66
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
77
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
88

9-
ssl_session_cache builtin:1000 shared:SSL:10m;
10-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
11-
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
12-
ssl_prefer_server_ciphers on;
13-
149
location / {
1510
proxy_pass http://127.0.0.1:8000;
1611
proxy_set_header Host $host;

0 commit comments

Comments
 (0)