Skip to content

Commit

Permalink
Working Apache config for websockets (home-assistant#3623)
Browse files Browse the repository at this point in the history
  • Loading branch information
jurafxp authored and fabaff committed Oct 21, 2017
1 parent 4fe5162 commit 1ca04aa
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions source/_docs/ecosystem/apache.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,19 @@ To be able to access to your Home Assistant instance by using https://home.examp

```text
<VirtualHost *:443>
ProxyPreserveHost On
ProxyRequests Off
ServerName home.example.org
ProxyPass /api/websocket ws://localhost:8123/api/websocket
ProxyPassReverse /api/websocket ws://localhost:8123/api/websocket
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://localhost:8123/
ProxyPassReverse / http://localhost:8123/
ProxyPass /api/websocket ws://localhost:8123/api/websocket
ProxyPassReverse /api/websocket ws://localhost:8123/api/websocket
RewriteEngine on
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://localhost:8123/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://localhost:8123/$1 [P,L]
</VirtualHost>
```

Expand Down

0 comments on commit 1ca04aa

Please sign in to comment.