Skip to content

Commit 93e6ffe

Browse files
committed
Setup SSL
1 parent eaae3ca commit 93e6ffe

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

nginx.conf

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,28 @@ upstream go_capture {
33
}
44

55
server {
6-
76
listen 80;
7+
server_name go-capture-api.code-apprentice.com;
8+
return 301 https://$server_name$request_uri;
9+
}
10+
11+
server {
12+
listen 443 ssl http2;
813

914
server_name go-capture-api.code-apprentice.com;
1015
client_max_body_size 0;
1116

17+
ssl_certificate /etc/letsencrypt/live/code-apprentice.com-0001/fullchain.pem;
18+
ssl_certificate_key /etc/letsencrypt/live/code-apprentice.com-0001/privkey.pem;
19+
ssl_session_cache shared:SSL:10m;
20+
ssl_protocols TLSv1.2 TLSv1.3;
21+
ssl_ciphers "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384";
22+
ssl_prefer_server_ciphers on;
23+
1224
location / {
1325
proxy_pass http://go_capture;
1426
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1527
proxy_set_header Host $host;
1628
proxy_redirect off;
1729
}
18-
1930
}

0 commit comments

Comments
 (0)