I am using caddy as a reverse proxy. I deployed an streamlit app and configured Caddyfile to use as a reverse proxy for streamlit application URL (http://ip-address:8501). It is working perfectly, but I also need to deploy second streamlit app and access it on (http://example.com/secondapp). I configured my Caddyfile like that:
#root * /var/www
How can I solve this?
I’m not familiar with Caddy, but skimming through their docs, you may want to use paths instead of URLs for the different applications.
Would you mind trying this and see if it solves the issue?
reverse_proxy /secondapp/* http://126.96.36.199:8502
Thanks for your quick reply. I tried it but it is not working. I got this message always…
Ok, thanks for your feedback!
Note that Streamlit, by default, doesn’t support running in a subdirectory as it expects apps to be deployed at the root of a domain.
Would you be able to run your Streamlit apps on their own subdomain rather than a subdirectory?
If not, I may pass your issue to the devs as they may be able to find a workaround for your issue.
I need to use in subdir. I appreciate it if you pass that to your dev team,
Thank you so much.
Sure! I’ve passed it to the Devs.
Thanks for your patience
Hi again Charly,
I solved the issue, I just start second streamlit app by
server.baseUrlPath option. I defined the path which I defined in my Caddyfile and it worked!
Oh, good to hear you managed to sort it!