# Example Apache config for reverse-proxying to Streamlit (port 8501).
# Use this inside a VirtualHost (e.g. in WHM/cPanel or httpd.conf).
# Requires: proxy, proxy_http, proxy_wstunnel, rewrite.

    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:8501/
    ProxyPassReverse / http://127.0.0.1:8501/

    # WebSocket support (required for Streamlit)
    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule /(.*) ws://127.0.0.1:8501/$1 [P,L]
