
<VirtualHost *:80>
ProxyPreserveHost On

# Replace with your sub domain
ServerName example.localhost

# Properly upgrade ws connections made by Baserow to the /ws path for realtime collab.
RewriteEngine on
RewriteCond ${HTTP:Upgrade} websocket [NC]
RewriteCond ${HTTP:Connection} upgrade [NC]
RewriteRule .* "ws://baserow:80/$1" [P,L,END]
ProxyPass /ws ws://baserow:80/ws
ProxyPassReverse /ws ws://baserow:80/ws

# Send everything else to Baserow as normal.
ProxyPass / http://baserow:80/
ProxyPassReverse / http://baserow:80/

</VirtualHost>
