# Configuring Apache 2.4 for proxy

**URL:** <https://discuss.streamlit.io/t/configuring-apache-2-4-for-proxy/1866>\
**Category:** Using Streamlit\
**Tags:** apache\
**Created:** [February 7, 2020, 3:51am UTC](https://discuss.streamlit.io/t/configuring-apache-2-4-for-proxy/1866 "2020-02-07T03:51:10Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Shiv\_Shankar](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/shiv_shankar/32/1178_2.png) [@Shiv\_Shankar](https://discuss.streamlit.io/u/Shiv_Shankar)\
**Post date:** [February 7, 2020, 11:30am UTC](https://discuss.streamlit.io/t/configuring-apache-2-4-for-proxy/1866/5 "2020-02-07T11:30:47Z")

</div>

In your case, I believe you are viewing partial content because the websocket is not getting forwarded. streamlit is relying on websockets for transporting its data.

Now, I have the full configuration that works even over https  
[https://dashboard-aircare.mapshalli.org/](https://dashboard-aircare.mapshalli.org/)

`<VirtualHost *:80>`  
&nbsp; &nbsp; `RewriteEngine on`  
&nbsp; &nbsp; `RewriteCond %{SERVER_NAME} =dashboard-aircare.mapshalli.org`  
&nbsp; &nbsp; `RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]`  
`</VirtualHost>`

`<VirtualHost *:443>`  
&nbsp;&nbsp; `ServerName dashboard-aircare.mapshalli.org`

&nbsp;&nbsp; `RewriteEngine On`  
&nbsp;&nbsp; `RewriteCond %{HTTP:Upgrade} =websocket`  
&nbsp;&nbsp; `RewriteRule /(.*) ws://localhost:8501/$1 [P]`  
&nbsp;&nbsp; `RewriteCond %{HTTP:Upgrade} !=websocket`  
&nbsp;&nbsp; `RewriteRule /(.*) http://localhost:8501/$1 [P]`  
&nbsp;&nbsp; `ProxyPassReverse / http://localhost:8501`

&nbsp; &nbsp; `SSLCertificateFile somepath`  
&nbsp; &nbsp; `SSLCertificateKeyFile someotherpath`  
`</VirtualHost>`

We are permanently directing from http:80 to https:443 and then proxying https:443 to http:8501 and ws:8501

---

_[View the full topic](https://discuss.streamlit.io/t/configuring-apache-2-4-for-proxy/1866)._
