add nginx代理streamlit.md
This commit is contained in:
parent
82bf949456
commit
178be2ff83
1 changed files with 39 additions and 0 deletions
39
Nginx/nginx代理streamlit.md
Normal file
39
Nginx/nginx代理streamlit.md
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
defaule upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name webservices.shasoapp.com;
|
||||||
|
|
||||||
|
ssl_certificate ssl/shasoapp.com.crt;
|
||||||
|
ssl_certificate_key ssl/shasoapp.com.key;
|
||||||
|
ssl_session_timeout 5m;
|
||||||
|
#ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
||||||
|
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
|
||||||
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
|
ssl_session_cache shared:SSL:50m;
|
||||||
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:4321;
|
||||||
|
client_body_timeout 300s;
|
||||||
|
proxy_send_timeout 300s;
|
||||||
|
proxy_connect_timeout 300s;
|
||||||
|
proxy_read_timeout 300;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ^~ /static {
|
||||||
|
proxy_pass http://localhost:4321/static/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /_stcore/stream {
|
||||||
|
proxy_pass http://localhost:4321/_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";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue