How to host an streamlit app on Apache server

Hi,

I am not sure if I am posting at the correct place.

I am trying to host a streamlit app on Apache server.
I went through the community, and tried the config as follows:
<VirtualHost *:80>
ServerName streamlitTesting.com
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /tst ws://streamlitTesting.com:8501/$1 [R]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /tst streamlitTesting.com:8501/$1 [R]
ProxyPassReverse /tst http://localhost:8501

It works on my local machine but does not work externally. Just wondering if anyone has experience on this. It is my first time applying Apache server, so quite confused.

Thanks.

Hi Yang_Zhang,

I found this that has helped me to deploy streamlit into a website. I have not finished the configuration, but despite it looks similar to your code they differ in a couple of points.

Try with that one.

bests

1 Like