Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - locally, home assistant is at http://192.168.1.125:8123
- - I need reverse proxy available at https://mydomain.com/home-assistant
- - Virtual host https://mydomain.com exsits and it should not be touched
- My virtual host setup:
- ```
- <VirtualHost *:443>
- ProxyPreserveHost On
- ProxyRequests off
- ProxyPass /home-assistant/api/websocket ws://192.168.1.125:8123/api/websocket
- ProxyPassReverse /home-assistant/api/websocket ws://192.168.1.125:8123/api/websocket
- ProxyPass /home-assistant http://192.168.1.125:8123
- ProxyPassReverse /home-assistant http://192.168.1.125:8123
- RewriteEngine on
- RewriteCond %{HTTP:Upgrade} =websocket [NC]
- RewriteRule /home-assistant/(.*) ws://192.168.1.125:8123/$1 [P,L]
- RewriteCond %{HTTP:Upgrade} !=websocket [NC]
- RewriteRule /home-assistant/(.*) http://192.168.1.125:8123/$1 [P,L]
- SSLEngine On
- DocumentRoot /home/michal/sites/webmail
- ServerAlias www.mydomain.com
- Include /etc/letsencrypt/options-ssl-apache.conf
- SSLCertificateFile /etc/letsencrypt/live/mydomain.com/fullchain.pem
- SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
- </VirtualHost>
- ```
- But it does not work. When accessing https://mydomain.com/home-assistant home assistant logo is loaded and I can see home assistant sitl tries to load its resources from mydomain.com/ url, not mydomain/home-assistant/ url, so it won't load
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement