Summary
- I’m trying to host my streamlit service on a subdomain name of my domain on my Ubuntu server using Nginx via http not https.
- No docker is involved.
- I got “WebsocketConnection WebSocket onerror” and “WebSocket connection to ‘wss://xxxx.xxxxx.com/_stcore/stream’ failed: (anonymous) @ main.ac67fab5.js:2” from Console
- I tried all the solutions in the forum with keyword “Nginx” but non worked so far.
- My streamlit service work nicely on the port 12345 of my server, but doesn’t work on my domain set up with Nginx.
- Thanks in advance for any suggestions!
Code
My nginx.conf:
server {
listen 80;
server_name xxxx.xxxxx.com;
location / {
proxy_pass http://127.0.0.1:12345/;
}
location /streamlit {
proxy_pass http://127.0.0.1:12345/streamlit;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}