Live logs and reverse proxy

Hello everyone,

Since version 2024.11, I have problems with displaying my logs from the HMI connected to my reverse proxy.

Locally, I have no problems, but with the URL, I have the following problem:
Loading full log…

image

it’s finished with
Failed to get a0d7b954_grafana logs, Failed to fetch

here is my apache conf:

<VirtualHost *:443>
ServerName WEBSITEFQN
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLProxyEngine On
RequestHeader set Front-End-Https “On”
ProxyPreserveHost On
RewriteEngine on
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLHonorCipherOrder on

ErrorLog ${APACHE_LOG_DIR}/error_has.websites.log
CustomLog ${APACHE_LOG_DIR}/access_has.website.log combined

Header always append Access-Control-Allow-Origin: “WEBSITEFQN”

ProxyRequests Off
ProxyPreserveHost on

ProxyPass /api/websocket ws://192.168.1.234:8123/api/websocket
ProxyPassReverse /api/websocket ws://192.168.1.234:8123/api/websocket

ProxyPass / http:// 192.168.1.234:8123/
ProxyPassReverse / http:// 192.168.1.234:8123/

RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.) ws:// 192.168.1.234:8123/$1 [P,L]
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.
) http:// 192.168.1.234:8123/$1 [P,L]

SSLCertificateFile /etc/letsencrypt/live/has.website.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/has.website.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf

it’s look like that the follow function using this URL:

WEBSITEFQN/api/hassio/addons/a0d7b954_grafana/logs/follow?lines=100
but im using
WEBSITEFQN/hassio/addon/a0d7b954_grafana/logs

Does its normal?

Someone encounter this issue?

Thanks

2 Likes

I too had been experiencing issues similar to this. HA is completely functional but I lost access to my Addon Logs when I’m going through my reverse proxy… If I access the system through the internal address I can view my addon logs… This wasn’t an issue until recent updates over the last 2-3 weeks.

Having also this issue. Has someone found a fix?

It would be great if we could get some eyes on this. I’ve opened a support request on Discord and haven’t been able to get any traction. Why is HA having issues with reverse proxies and the live addon logs? This was NEVER an issue before the live logs existed.

Found this thread through your Github post (which is now gone??). But this is my exact experience as well. Using IP directly, logs work. Using my local url or exposed url through reverse proxy, they do not

Same problem with the cloudflare tunnel. For reference: Log streaming & cloudflared · brenner-tobias/addon-cloudflared · Discussion #744 · GitHub

Hi

Someone can try to add this on apache conf?

# Handle WebSocket and logs
<LocationMatch "^/api/hassio/.*/logs">
    ProxyPass http://192.168.1.234:8123/api/hassio/$0
    ProxyPassReverse http://192.168.1.234:8123/api/hassio/$0

    # Disable buffering for streaming responses
    SetEnv proxy-sendchunked 1
    SetEnv proxy-chain-auth On

    # Set response header to disable buffering
    Header always set X-Accel-Buffering "no"

    # Forward Authorization header to backend
    RequestHeader set Authorization %{HTTP:Authorization}e

    # Ensure correct content type for logs
    RequestHeader set Content-Type "text/event-stream"
    Header always set Content-Type "text/event-stream"
</LocationMatch>

now i have the live icon at bottom of the page, but still not data … 401 Unauthorized

Cheers