Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95385

I can not login remotely

$
0
0

@lukash1 wrote:

Hello, I have already read a lot in the forum. Unfortunately nothing has worked yet.

I would like to access my Home Assistant remotely. I already have a remote proxy running for some other applications. This reverse proxy is running on an Apache2 server.

The connections are SSL encrypted. (via let’s Encrypt)

I also get to the login page normally. But when I have entered my username and password, the message appears:

“Unable to connect to Home Assistant.”

What am I doing wrong?

<VirtualHost *:80>
 ServerName homeassistant.domain.com
 ProxyPreserveHost On
 ProxyRequests Off
 ProxyPass / http://192.168.178.200:8123
 ProxyPassReverse / http://192.168.178.200:8123
 ProxyPass /api/websocket ws://192.168.178.200:8123/api/websocket
 ProxyPassReverse /api/websocket ws://192.168.178.200:8123/api/websocket

 RewriteEngine on
 RewriteCond %{HTTP:Upgrade} =websocket [NC]
 RewriteRule /(.*)  ws://192.168.178.200:8123/$1 [P,l]
 RewriteCond %{HTTP:Upgrade} !=websocket [NC]
 RewriteRule /(.*)  http://192.168.178.200:8123/$1 [P,l]

</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
 ServerName homeassistant.domain.com

 SSLProxyEngine On
 Include /etc/letsencrypt/options-ssl-apache.conf



 ProxyPreserveHost On
 ProxyRequests Off
 ProxyPass / http://192.168.178.200:8123
 ProxyPassReverse / http://192.168.178.200:8123
 ProxyPass /api/websocket ws://192.168.178.200:8123/api/websocket
 ProxyPassReverse /api/websocket ws://192.168.178.200:8123/api/websocket

 RewriteEngine on
 RewriteCond %{HTTP:Upgrade} =websocket [NC]
 RewriteRule /(.*) ws://192.168.178.200:8123/$1 [P,l]
 RewriteCond %{HTTP:Upgrade} !=websocket [NC]
 RewriteRule /(.*)  http://192.168.178.200:8123/$1 [P,l]
 SSLCertificateFile /etc/letsencrypt/live/homeassistant.domain.com/fullchain.pem
 SSLCertificateKeyFile /etc/letsencrypt/live/homeassistant.domain.com/privkey.pem
</VirtualHost>
</IfModule>

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Uncomment this if you are using SSL/TLS, running in Docker container, etc.
 http:
   base_url: "https://homeassistant.domain.com:8123"
   use_x_forwarded_for: true
   trusted_proxies:
    - 192.168.178.202

# Text to speech
tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

My Home Assistant run on IP 192.168.178.200
My reverse Proxy run on IP 192.168.178.202

Sorry if the answer is already in the forum, but I either did not find it or did not understand it.

Thanks for your help

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>