-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
39 lines (32 loc) · 1.33 KB
/
nginx.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
39
server {
server_name equity.gistlab.science;
location / {
proxy_pass http://127.0.0.1:8501;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Fix loading error: https://discuss.streamlit.io/t/websocketconnection-websocket-onerror/46298/6
location /_stcore/stream {
proxy_pass http://127.0.0.1:8501/_stcore/stream;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/equity.gistlab.science/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/equity.gistlab.science/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = equity.gistlab.science) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name equity.gistlab.science;
return 404; # managed by Certbot
}