-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx-https.conf
39 lines (33 loc) · 915 Bytes
/
nginx-https.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
34
35
36
37
38
# see https://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# make sure http becomes https
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}
# see https://flask-socketio.readthedocs.io/en/latest/
server {
listen 443 ssl;
listen [::]:443 ssl;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/key.pem;
location / {
proxy_pass http://doko3000:5000;
}
location /doko3000.io {
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://doko3000:5000/doko3000.io;
}
# static files might be delivered faster by nginx
location /static {
root /usr/share/nginx/html;
}
}