0.35 new base_url parameter for http component

Hi,

I just noticed that there is now a base_url parameter for the http component.
Does this mean, I can run hass on an arbitrary url path now, e.g. even behind an apache reverse proxy like https://myhost.example.com/homeassistant?

How would a correct configuration look like then - I noticed that in 35.2 there has been resolved a conflict with the server_port parameter?

My original config looked like this:

http:
  server_port: 8123

And I had an apache vhost that basically did:

ProxyPass            /api/websocket  ws://localhost:8123/api/websocket
ProxyPassReverse    /api/websocket  ws://localhost:8123/api/websocket
ProxyPass            /                http://127.0.0.1:8123/
ProxyPassReverse    /                http://127.0.0.1:8123/
ProxyPreserveHost    On

So with the base_url parameter, could I do it just like this:

http:
  #server_port: 8123
  base_url: mydomain.example.com:8123/hass

and regarding apache:

<Location /hass>
        ProxyPass               http://127.0.0.1:8123/hass
        ProxyPassReverse        http://127.0.0.1:8123/hass
        [...]
</Location>

What about the server port with regards to the base_url parameter?

“Release 0.35.2 - December 19
When base url specified, do not combine it with server_port (@balloob)”

Is there a place that provides a little more detail to the release notes, generally speaking?
Other than the component documentation page for the affected component?

Sebastian

1 Like

Nop, this is not supported.

Ok, thanks.
So this parameter exists only to fix some error with the TTS component?

Sebastian

I too would like to know about this.
The http doc and the 0.35 release notes don’t say what it actually does.

I would like to know if it could help me with redirects/ports on my router. Before I added TTS and LetsEncrypt, I had my main http:// DDNS URL pointing to a web server on PC1 and the same URL:8123 pointing to HA on PC2. Now I have https:// DDNS URL pointing to HA, but http:// DDNS URL is dead and I had to add a subdirectory to my PC1 web server, which I’d rather not have.
Is this base_url something that could help me, or… what does it actually do?
Thanks!