I want to use nginx as a reverse proxy on my server but when I try to use, I got 502 Bad Gateway Error. Can anyone help me about this? I tried How to use Streamlit with Nginx? - Deployment - Streamlit, but it not worked for me. Can anyone help me about that?
Nginx Conf File:
At a minimum you are missing some of the config lines to allow the connection to upgrade itself to a websocket. I see these lines in the config example you linked, but not your config, specifically these bits:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
Those two headers are needed for nginx to be able to proxy a websocket connection. Here’s more info if you are interested:
I solved the issue but now streamlit app stuck on loading screen… How can I solve it can anyone help?
BTW, root cause of main problem is nginx user can’t access to upstream server so I add nginx user to the wheel with this command
sudo usermod -aG wheel nginx and set enforce to 0 with this command
sudo setenforce 0 this solved the problem.
Thank for your reply. I edited the conf file but it is same
Do you have any other suggestion?
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.