Apache Reverse Proxy to Nginx Reverse Proxy to streamlit app connection failed

I have multiple streamlit apps deployed on linux running docker containers behind an nginx reverse proxy in http. My nginx setup is as follows. I can access each app when I go to http://myserver/report1 or report2.

       server {
                listen 80;

                 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 300;
                 proxy_redirect off;

                location /reports/report1/ {
                proxy_pass http://report1:8502/;
                }

                location /reports/report2/ {
                proxy_pass http://report2:8502/;
                }
        }
}

But this is not the server that users use to access reports. That server (lets call it server2) is running apache to serve content under https. My problem is that I can’t seem to get apache to load the streamlit apps from server1 on server2. I get the below error.

I guess I want to know is it possible for apache to reverse proxy from myserver2 to nginx that is reverse proxying to a streamlit application on myserver1

This link solved the problem for me.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.