-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.prod.conf
33 lines (28 loc) · 1020 Bytes
/
nginx.prod.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Replace .mysite.tld with your domain
server {
listen 80;
server_name .mysite.tld;
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name .mysite.tld;
ssl_certificate /etc/letsencrypt/live/mysite.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mysite.tld/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers on;
# curl https://ssl-config.mozilla.org/ffdhe2048.txt > .docker/certbot/dhparam/dhparam-2048.pem
ssl_dhparam /etc/nginx/dhparam/dhparam-2048.pem;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://app:3000;
proxy_redirect off;
}
}