Remote access to Hass.io, apache2, letsencrypt, own domain and static IP

(Sorry for the underscores, but the editor is interpreting part of my text as links for some reason. I am a new user so i cannot post more then 2 links)

I have installed Hassio on my Raspberry Pi 3B following the instructions for alternative install on a generic Linux host.

Everything works fine from my local network on 192.168.1.80:8123, but I am struggling to access HA remotely from my phone browser or HA app.

Notes:

  • I have a static IP address
  • I have a registered domain mysite_com
  • I use Apache2 as reverse proxy on home_mysite.com (this redirects to the local HA on 8123)
  • I have automatic redirection from http to https
  • All my other services work as expected
  • I have lets encrypt certificates for the all my subdomains including home_mysite_com
  • I have copied the fullchain.pem and privkey.pem from the default letsencypt location to /usr/share/hassio/ssl

When I try to connect to home_mysite.com the following happens…

From the HA app (on 4G)
I get to the login phase, but when I click connect I receive a 405 error.

From the phone browser (on 4G)
I attempt to login but then I receive: Unable to connect to Home Assistant

From my browser (internal network)
Same as phone browser

If it helps, these are my settings.
https://www.dropbox.com/s/g3i98mr3r0glj1t/settings.txt?dl=0

And this is the log error message

020-02-08 09:50:42 ERROR (MainThread) [homeassistant.components.hassio] Invalid config for [http]: not a file for dictionary value @ data['http']['ssl_certificate']. Got '/usr/share/hassio/ssl/fullchain.pem'
not a file for dictionary value @ data['http']['ssl_key']. Got '/usr/share/hassio/ssl/privkey.pem'. (See /config/configuration.yaml, line 6).

Any suggestion?

I managed to solve this. Just in case someone else has the same issue. Add this to your virtual host

        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]

and this to your ssl config file

        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]

Hi!
How could i do this setup on my homeassistant? I have some trouble finding a tutorial that works for me.